From ebfc93de214f308a4c76a7c64c5c4b0e45b2182d Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Thu, 24 Sep 2009 20:20:43 +0000 Subject: * explicit cast needed for mingw. --- source/gameengine/Expressions/PyObjectPlus.h | 4 ++-- source/gameengine/Ketsji/KX_PyMath.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index f9edb7877b0..d8ab007dde9 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -112,13 +112,13 @@ typedef struct PyObjectPlus_Proxy { static PyAttributeDef Attributes[]; \ virtual PyTypeObject *GetType(void) {return &Type;}; \ virtual PyObject *GetProxy() {return GetProxy_Ext(this, &Type);}; \ - virtual PyObject *NewProxy(bool py_owns) {return NewProxy_Ext(this, &Type, py_owns);}; \ + virtual PyObject *NewProxy(bool py_owns) {return NewProxy_Ext(this, &Type, py_owns);}; #ifdef WITH_CXX_GUARDEDALLOC #define Py_Header __Py_Header \ void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, Type.tp_name); } \ - void operator delete( void *mem ) { MEM_freeN(mem); } \ + void operator delete( void *mem ) { MEM_freeN(mem); } #else #define Py_Header __Py_Header diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h index 17102905607..1ce8bcafbb6 100644 --- a/source/gameengine/Ketsji/KX_PyMath.h +++ b/source/gameengine/Ketsji/KX_PyMath.h @@ -157,7 +157,7 @@ bool PyVecTo(PyObject* pyval, T& vec) return true; } - else if (PyObject_TypeCheck(pyval, &PyObjectPlus::Type)) + else if (PyObject_TypeCheck(pyval, (PyTypeObject *)&PyObjectPlus::Type)) { /* note, include this check because PySequence_Check does too much introspection * on the PyObject (like getting its __class__, on a BGE type this means searching up * the parent list each time only to discover its not a sequence. -- cgit v1.2.3