diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-25 18:07:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-25 18:07:25 +0300 |
commit | 965c46b1d3e3f4907c5d4d32c343809470ae9bca (patch) | |
tree | 8616b5984b055d62f6669c975cde368806a1d519 /source/gameengine/Expressions/PyObjectPlus.cpp | |
parent | e06eea4fbad2932dcceab99ee865ac02a6078129 (diff) |
follow up on patch [#26215], not all weakref references were ifdef'd
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.cpp')
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index 84d6a1cba4b..e205ddfda2e 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -1122,7 +1122,9 @@ PyObject *PyObjectPlus::GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, v 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 @@ PyObject *PyObjectPlus::NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, v 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) |