was casting the PyObjectPlus type to a PyObject for new BGE vector and matrix types...
[blender.git] / source / gameengine / Expressions / PyObjectPlus.h
index e9e81dddaaaeee9d5dfedcc28c5649beb5081692..f9edb7877b0f5d60791a007743ca11df9ecb1cc3 100644 (file)
@@ -86,7 +86,7 @@ typedef struct {
 
 
 
-typedef struct {
+typedef struct PyObjectPlus_Proxy {
        PyObject_HEAD           /* required python macro   */
        class PyObjectPlus *ref;
        bool py_owns;
@@ -99,6 +99,9 @@ typedef struct {
 /* Note, sometimes we dont care what BGE type this is as long as its a proxy */
 #define BGE_PROXY_CHECK_TYPE(_type) ((_type)->tp_dealloc == PyObjectPlus::py_base_dealloc)
 
+/* Opposite of BGE_PROXY_REF */
+#define BGE_PROXY_FROM_REF(_self) (((PyObjectPlus *)_self)->GetProxy())
+
 
                                                                // This must be the first line of each 
                                                                // PyC++ class