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:
Al Riddoch 2005-12-12 01:13:28 +00:00
parent ad8e5989cf
commit a5d0ca0474
4 changed files with 20 additions and 1 deletions

View file

@ -6,8 +6,10 @@
PythonWrapper::PythonWrapper(PyObject * wrapper) : m_wrapper(wrapper)
{
Py_INCREF(m_wrapper);
}
PythonWrapper::~PythonWrapper()
{
Py_DECREF(m_wrapper);
}