Browse Source

Fix API difference for newer versions of python

(cherry picked from commit 3e95f4fe5a)
rarified/huru-merge-work/code-cleanup
Zrax 13 years ago committed by rarified
parent
commit
e43d316e7b
  1. 5
      Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp

5
Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp

@ -1936,7 +1936,12 @@ hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, Int32* size)
{
PyObject *s; // the python string object where the marsalled object wil go
// convert object to a marshalled string python object
#if (PY_MAJOR_VERSION == 2) && (PY_MINOR_VERSION < 4)
s = PyMarshal_WriteObjectToString(pyobj);
#else
s = PyMarshal_WriteObjectToString(pyobj, 0);
#endif
// did it actually do it?
if ( s != NULL )
{

Loading…
Cancel
Save