[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35183] trunk/blender/source/gameengine/ Expressions: follow up on patch [#26215], not all weakref references were ifdef'd

Campbell Barton ideasman42 at gmail.com
Fri Feb 25 16:07:25 CET 2011


Revision: 35183
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35183
Author:   campbellbarton
Date:     2011-02-25 15:07:25 +0000 (Fri, 25 Feb 2011)
Log Message:
-----------
follow up on patch [#26215], not all weakref references were ifdef'd

Modified Paths:
--------------
    trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
    trunk/blender/source/gameengine/Expressions/PyObjectPlus.h

Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp	2011-02-25 15:04:55 UTC (rev 35182)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp	2011-02-25 15:07:25 UTC (rev 35183)
@@ -1122,7 +1122,9 @@
 		self->m_proxy = reinterpret_cast<PyObject *>PyObject_NEW( PyObjectPlus_Proxy, tp);
 		BGE_PROXY_PYOWNS(self->m_proxy) = false;
 		BGE_PROXY_PYREF(self->m_proxy) = true;
+#ifdef USE_WEAKREFS
 		BGE_PROXY_WKREF(self->m_proxy) = NULL;
+#endif
 	}
 	//PyObject_Print(self->m_proxy, stdout, 0);
 	//printf("ref %d\n", self->m_proxy->ob_refcnt);
@@ -1143,7 +1145,9 @@
 		BGE_PROXY_PYOWNS(proxy) = py_owns;
 		BGE_PROXY_REF(proxy) = NULL; 
 		BGE_PROXY_PTR(proxy) = ptr;
+#ifdef USE_WEAKREFS
 		BGE_PROXY_WKREF(self->m_proxy) = NULL;
+#endif
 		return proxy;
 	}
 	if (self->m_proxy)

Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.h
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.h	2011-02-25 15:04:55 UTC (rev 35182)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.h	2011-02-25 15:07:25 UTC (rev 35183)
@@ -108,7 +108,9 @@
 #define BGE_PROXY_PTR(_self) (((PyObjectPlus_Proxy *)_self)->ptr)
 #define BGE_PROXY_PYOWNS(_self) (((PyObjectPlus_Proxy *)_self)->py_owns)
 #define BGE_PROXY_PYREF(_self) (((PyObjectPlus_Proxy *)_self)->py_ref)
-#define BGE_PROXY_WKREF(_self) (((PyObjectPlus_Proxy *)_self)->in_weakreflist)
+#ifdef USE_WEAKREFS
+	#define BGE_PROXY_WKREF(_self) (((PyObjectPlus_Proxy *)_self)->in_weakreflist)
+#endif
 
 /* 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)




More information about the Bf-blender-cvs mailing list