diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-29 20:54:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-29 20:54:45 +0400 |
commit | 81dfdf8374382c766c88bbed421ed70c02565234 (patch) | |
tree | 397ddc7c0a25bd554f8a83313100660ec2b006a8 /source/gameengine/Expressions/PyObjectPlus.cpp | |
parent | d6c525d624ea98bf6eeac1a7f3483f41fed1ef4f (diff) |
ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing)
.
No changes for py2.x.
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.cpp')
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index 8bd34cdc73b..e6b49332273 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -56,8 +56,13 @@ PyTypeObject PyObjectPlus::Type = { - PyObject_HEAD_INIT(NULL) +#if (PY_VERSION_HEX >= 0x02060000) + PyVarObject_HEAD_INIT(NULL, 0) +#else + /* python 2.5 and below */ + PyObject_HEAD_INIT( NULL ) /* required py macro */ 0, /*ob_size*/ +#endif "PyObjectPlus", /*tp_name*/ sizeof(PyObjectPlus_Proxy), /*tp_basicsize*/ 0, /*tp_itemsize*/ |