Author: Wim Lavrijsen <[email protected]>
Branch: reflex-support
Changeset: r46581:f96b087dedb3
Date: 2011-08-17 13:31 -0700
http://bitbucket.org/pypy/pypy/changeset/f96b087dedb3/

Log:    enqueue del (needed to get past new check in pypy/rpython/rclass.py)

diff --git a/pypy/module/cppyy/interp_cppyy.py 
b/pypy/module/cppyy/interp_cppyy.py
--- a/pypy/module/cppyy/interp_cppyy.py
+++ b/pypy/module/cppyy/interp_cppyy.py
@@ -520,13 +520,15 @@
                                  self.space.wrap("trying to access a NULL 
pointer"))
 
     def destruct(self):
+        assert isinstance(self, W_CPPInstance)
         if self.rawobject:
             capi.c_destruct(self.cppclass.handle, self.rawobject)
             self.rawobject = NULL_VOIDP
 
     def __del__(self):
         if self.python_owns:
-            self.destruct()
+            self.enqueue_for_destruction(self.space, W_CPPInstance.destruct,
+                                         '__del__() method of ')
 
 
 W_CPPInstance.typedef = TypeDef(
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to