From 41be132eb7d3a55d5c2dbd147a23b247f8f7ed76 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 8 Jul 2009 14:26:43 +0000 Subject: [PATCH] 2.5 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 | 6 ++++++ 1 file changed, 6 insertions(+) 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