[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] [ksterker/adonthell] 0bd12f: FIXED issues with mutat
From: |
GitHub |
Subject: |
[Adonthell-commits] [ksterker/adonthell] 0bd12f: FIXED issues with mutating tuple surfaced in event... |
Date: |
Sat, 16 Mar 2013 16:14:29 -0700 |
Branch: refs/heads/master
Home: https://github.com/ksterker/adonthell
Commit: 0bd12f947ee4a5951d1dd036ab2409b02d2608f9
https://github.com/ksterker/adonthell/commit/0bd12f947ee4a5951d1dd036ab2409b02d2608f9
Author: Kai Sterker <address@hidden>
Date: 2013-03-16 (Sat, 16 Mar 2013)
Changed paths:
M src/event/listener_python.cc
Log Message:
-----------
FIXED issues with mutating tuple surfaced in eventtest.py.
The event test script showed lots of errors similar to the following:
Traceback (most recent call last):
File "data/game_events/time_events.py", line 41, in callback_2
print "#2", self.counter, evt.time (), base.Timer.uptime (),
lst.get_event ().repeat ()
SystemError: Objects/tupleobject.c:142: bad argument to internal
function
Appearently, python tuples are supposed to be immutable, so it is a bad
idea to use the same tuple and just exchange every parameter. We still
update the event parameter every time the callback is executed, but this
does not trigger an error in the test script.
Commit: 94171c6caf67263bb57b5a29566cc285bb9fb877
https://github.com/ksterker/adonthell/commit/94171c6caf67263bb57b5a29566cc285bb9fb877
Author: Kai Sterker <address@hidden>
Date: 2013-03-16 (Sat, 16 Mar 2013)
Changed paths:
M src/base/serializer.h
M src/event/event.cc
M src/event/listener.cc
M src/event/types.cc
M src/event/types.h
M src/python/pool.cc
M src/python/pool.h
M src/python/script.cc
M src/python/script.h
M src/rpg/character.cc
M src/rpg/character.h
M src/rpg/dialog.cc
M src/rpg/faction.cc
M src/rpg/faction.h
M src/rpg/item.cc
M src/rpg/item.h
M src/rpg/item_storage.h
M src/rpg/slot.cc
M src/world/mapview.cc
M src/world/schedule.cc
M src/world/schedule_data.cc
Log Message:
-----------
FIXED memory leaks in Python interfaces.
FIXED typo.
Hope there are not too many Py_DECREFs in place now, but both worldtest
and some of the python test scripts (itemtest, eventtest) still run
without issue, so it should be okay.
Compare:
https://github.com/ksterker/adonthell/compare/9f2435c93b6c...94171c6caf67
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] [ksterker/adonthell] 0bd12f: FIXED issues with mutating tuple surfaced in event...,
GitHub <=