cyphesis/rulesets/PythonWrapper.cpp
Al Riddoch a5d0ca0474 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.
2005-12-12 01:13:28 +00:00

15 lines
363 B
C++

// This file may be redistributed and modified only under the terms of
// the GNU General Public License (See COPYING for details).
// Copyright (C) 2005 Alistair Riddoch
#include "PythonWrapper.h"
PythonWrapper::PythonWrapper(PyObject * wrapper) : m_wrapper(wrapper)
{
Py_INCREF(m_wrapper);
}
PythonWrapper::~PythonWrapper()
{
Py_DECREF(m_wrapper);
}