mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
* 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.
15 lines
363 B
C++
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);
|
|
}
|