diff options
author | Kent Mein <mein@cs.umn.edu> | 2008-09-06 18:13:31 +0400 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2008-09-06 18:13:31 +0400 |
commit | 115cf18bed42d590545d83c73438dc826120313a (patch) | |
tree | 1ba35fd4bcdf0932dbdffbf398e89852213b51c7 /source/gameengine/GamePlayer | |
parent | 810f79966049f126f23dc39bc7703c81bd5f8748 (diff) |
converted my gen_utils.h fix to PyObjectPlus.h
Also added a fix for PyMarshal_WriteObjectToString
Now I just need to figure out linking of the gameengine on my imac.
Kent
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index a690beb9f38..806216e05bb 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -717,7 +717,11 @@ void GPG_Application::stopEngine() if (gameLogic) { PyObject* pyGlobalDict = PyDict_GetItemString(PyModule_GetDict(gameLogic), "globalDict"); // Same as importing the module if (pyGlobalDict) { +#ifdef Py_MARSHAL_VERSION PyObject* pyGlobalDictMarshal = PyMarshal_WriteObjectToString( pyGlobalDict, 2); // Py_MARSHAL_VERSION == 2 as of Py2.5 +#else + PyObject* pyGlobalDictMarshal = PyMarshal_WriteObjectToString( pyGlobalDict ); +#endif if (pyGlobalDictMarshal) { m_pyGlobalDictString_Length = PyString_Size(pyGlobalDictMarshal); PyObject_Print(pyGlobalDictMarshal, stderr, 0); |