diff options
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.h')
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index ea9cbc0587b..2bcb604dd23 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -117,6 +117,18 @@ static inline void Py_Fatal(char *M) { return ((class_name*) self)->Py##method_name(self, args, kwds); \ }; \ +#define KX_PYMETHOD_NOARGS(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self); \ + static PyObject* sPy##method_name( PyObject* self) { \ + return ((class_name*) self)->Py##method_name(self); \ + }; \ + +#define KX_PYMETHOD_O(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self, PyObject* value); \ + static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \ + return ((class_name*) self)->Py##method_name(self, value); \ + }; \ + #define KX_PYMETHOD_DOC(class_name, method_name) \ PyObject* Py##method_name(PyObject* self, PyObject* args, PyObject* kwds); \ static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \ @@ -124,6 +136,21 @@ static inline void Py_Fatal(char *M) { }; \ static char method_name##_doc[]; \ +#define KX_PYMETHOD_DOC_O(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self, PyObject* value); \ + static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \ + return ((class_name*) self)->Py##method_name(self, value); \ + }; \ + static char method_name##_doc[]; \ + +#define KX_PYMETHOD_DOC_NOARGS(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self); \ + static PyObject* sPy##method_name( PyObject* self) { \ + return ((class_name*) self)->Py##method_name(self); \ + }; \ + static char method_name##_doc[]; \ + + /* The line above should remain empty */ /** * Method table macro (with doc) |