mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
2005-12-12 Al Riddoch <alriddoch@zepler.org>
* rulesets/PythonWrapper.cpp: Make sure PythonWrapper holds a propper reference to the wrapper object, to ensure its not dealloced. * rulesets/Py_Location.cpp: Store a PythonWrapper when creating a new wrapper object if the entity does not already have a script. * rulesets/MemMap.cpp: Fix an uninitialised variable.
This commit is contained in:
parent
ad8e5989cf
commit
a5d0ca0474
4 changed files with 20 additions and 1 deletions
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
PythonWrapper::PythonWrapper(PyObject * wrapper) : m_wrapper(wrapper)
|
||||
{
|
||||
Py_INCREF(m_wrapper);
|
||||
}
|
||||
|
||||
PythonWrapper::~PythonWrapper()
|
||||
{
|
||||
Py_DECREF(m_wrapper);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue