From 7440fee85c6d2d4c5854337ae8bf3ed7aea91a50 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 10 Aug 2009 00:07:34 +0000 Subject: remove python2.x support --- source/gameengine/Expressions/PyObjectPlus.h | 44 ++-------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) (limited to 'source/gameengine/Expressions/PyObjectPlus.h') diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index a18df9d36a9..d68aa9f0410 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -51,44 +51,6 @@ extern "C" { } #endif -extern "C" { -#include "../../blender/python/intern/bpy_compat.h" -} - - -/* - Py_RETURN_NONE - Python 2.4 macro. - defined here until we switch to 2.4 - also in api2_2x/gen_utils.h -*/ -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif -#ifndef Py_RETURN_FALSE -#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False -#endif -#ifndef Py_RETURN_TRUE -#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True -#endif - -/* for pre Py 2.5 */ -#if PY_VERSION_HEX < 0x02050000 -typedef int Py_ssize_t; -typedef Py_ssize_t (*lenfunc)(PyObject *); -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -#define PY_METHODCHAR char * -#else -/* Py 2.5 and later */ -#define intargfunc ssizeargfunc -#define intintargfunc ssizessizeargfunc -#define PY_METHODCHAR const char * -#endif - -#include "descrobject.h" - - static inline void Py_Fatal(const char *M) { fprintf(stderr, "%s\n", M); exit(-1); @@ -230,13 +192,13 @@ typedef struct { * Method table macro (with doc) */ #define KX_PYMETHODTABLE(class_name, method_name) \ - {#method_name , (PyCFunction) class_name::sPy##method_name, METH_VARARGS, (PY_METHODCHAR)class_name::method_name##_doc} + {#method_name , (PyCFunction) class_name::sPy##method_name, METH_VARARGS, (const char *)class_name::method_name##_doc} #define KX_PYMETHODTABLE_O(class_name, method_name) \ - {#method_name , (PyCFunction) class_name::sPy##method_name, METH_O, (PY_METHODCHAR)class_name::method_name##_doc} + {#method_name , (PyCFunction) class_name::sPy##method_name, METH_O, (const char *)class_name::method_name##_doc} #define KX_PYMETHODTABLE_NOARGS(class_name, method_name) \ - {#method_name , (PyCFunction) class_name::sPy##method_name, METH_NOARGS, (PY_METHODCHAR)class_name::method_name##_doc} + {#method_name , (PyCFunction) class_name::sPy##method_name, METH_NOARGS, (const char *)class_name::method_name##_doc} /** * Function implementation macro -- cgit v1.2.3