GamePython related: changed ordering of python destruction, and reverted some python changes (it caused problems)

This commit is contained in:
2006-05-14 03:39:07 +00:00
parent b817c78b0d
commit 337a84ee96
3 changed files with 20 additions and 2 deletions

View File

@@ -371,8 +371,8 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
// when exiting the mainloop
dictionaryClearByHand(gameLogic);
exitGamePythonScripting();
ketsjiengine->StopEngine();
exitGamePythonScripting();
networkdevice->Disconnect();
}
if (sceneconverter)

View File

@@ -56,6 +56,20 @@ SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj,
{
}
/*
//debugging
CValue* SCA_PythonController::AddRef()
{
//printf("AddRef refcount = %i\n",GetRefCount());
return CValue::AddRef();
}
int SCA_PythonController::Release()
{
//printf("Release refcount = %i\n",GetRefCount());
return CValue::Release();
}
*/
SCA_PythonController::~SCA_PythonController()
@@ -278,7 +292,7 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
Py_DECREF(excdict);*/
#if 0
#if 1
PyObject *excdict= PyDict_Copy(m_pythondictionary);
PyObject* resultobj = PyEval_EvalCode((PyCodeObject*)m_bytecode,
excdict,

View File

@@ -54,6 +54,10 @@ class SCA_PythonController : public SCA_IController
public:
static SCA_PythonController* m_sCurrentController; // protected !!!
//for debugging
//virtual CValue* AddRef();
//virtual int Release(); // Release a reference to this value (when reference count reaches 0, the value is removed from the heap)
SCA_PythonController(SCA_IObject* gameobj,PyTypeObject* T = &Type);
virtual ~SCA_PythonController();