mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Fix API difference for newer versions of python
This commit is contained in:
@ -1904,7 +1904,12 @@ hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, Int32* size)
|
|||||||
{
|
{
|
||||||
PyObject *s; // the python string object where the marsalled object wil go
|
PyObject *s; // the python string object where the marsalled object wil go
|
||||||
// convert object to a marshalled string python object
|
// convert object to a marshalled string python object
|
||||||
|
#if (PY_MAJOR_VERSION == 2) && (PY_MINOR_VERSION < 4)
|
||||||
s = PyMarshal_WriteObjectToString(pyobj);
|
s = PyMarshal_WriteObjectToString(pyobj);
|
||||||
|
#else
|
||||||
|
s = PyMarshal_WriteObjectToString(pyobj, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
// did it actually do it?
|
// did it actually do it?
|
||||||
if ( s != NULL )
|
if ( s != NULL )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user