diff options
author | Ton Roosendaal <ton@blender.org> | 2009-07-08 18:26:43 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-07-08 18:26:43 +0400 |
commit | 41be132eb7d3a55d5c2dbd147a23b247f8f7ed76 (patch) | |
tree | 25d1c8801045ba776122ede47e3731f6e4c134a6 /source/blender/python | |
parent | eb5f6f7d9320829ff61e9816b40d13a9664293d8 (diff) |
2.5
Copied some Python compat stuff to get py 2.3 running... just
googled for it on python.org mailing list.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_compat.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_compat.h b/source/blender/python/intern/bpy_compat.h index 1ad9376c13b..e999f57c733 100644 --- a/source/blender/python/intern/bpy_compat.h +++ b/source/blender/python/intern/bpy_compat.h @@ -85,6 +85,12 @@ typedef Py_ssize_t (*lenfunc)(PyObject *); #ifndef Py_RETURN_TRUE #define Py_RETURN_TRUE return PyBool_FromLong(1) #endif + +#define PyInt_FromSsize_t PyInt_FromLong +#define PyNumber_AsSsize_t(ob, exc) PyInt_AsLong(ob) +#define PyIndex_Check(ob) PyInt_Check(ob) + + #endif |