2.5
authorTon Roosendaal <ton@blender.org>
Wed, 8 Jul 2009 14:26:43 +0000 (14:26 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 8 Jul 2009 14:26:43 +0000 (14:26 +0000)
Copied some Python compat stuff to get py 2.3 running... just
googled for it on python.org mailing list.

source/blender/python/intern/bpy_compat.h

index 1ad9376c13b93e9d611f823d5a7e65088dc901de..e999f57c73372fe9b2ab3a8cc3bd62f9b5b8819c 100644 (file)
@@ -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