diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2007-03-14 19:38:58 +0300 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2007-03-14 19:38:58 +0300 |
commit | 26aa15969fd263ffe7349462f61b4bb9c023e756 (patch) | |
tree | e8ebaffe6efcda12083ebcd5dbdfad5e63e0dd9a /source/blender/python/api2_2x/gen_utils.h | |
parent | 981d24daa179b53b99899da6417c32996a985286 (diff) |
attempted fixage for gcc warnings with Python 2.5
Diffstat (limited to 'source/blender/python/api2_2x/gen_utils.h')
-rw-r--r-- | source/blender/python/api2_2x/gen_utils.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/gen_utils.h b/source/blender/python/api2_2x/gen_utils.h index 636e45b609e..519c7ba9d22 100644 --- a/source/blender/python/api2_2x/gen_utils.h +++ b/source/blender/python/api2_2x/gen_utils.h @@ -59,6 +59,23 @@ #define Py_RETURN_TRUE return PyBool_FromLong(1) #endif +/* Py 2.5 adds a new Py_ssize_t type for 64 bit support */ +/* #if'ed for your compiling pleasure */ +#if 1 + +/* for pre Py 2.5 */ +#if PY_VERSION_HEX < 0x02050000 +typedef int Py_ssize_t; +#define PY_SSIZE_T_MAX INT_MAX +#define PY_SSIZE_T_MIN INT_MIN +#else +/* Py 2.5 and later */ +#define intargfunc ssizeargfunc +#define intintargfunc ssizessizeargfunc +#endif + +#endif + /* name of list of Armature weak refs built into __main__ */ #define ARM_WEAKREF_LIST_NAME "__arm_weakrefs" |