Author: Armin Rigo <[email protected]>
Branch: gc-del
Changeset: r66050:cfb1c8acb1b9
Date: 2013-08-10 10:59 +0200
http://bitbucket.org/pypy/pypy/changeset/cfb1c8acb1b9/

Log:    Fix for 6fed217ef39c

diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -236,6 +236,8 @@
             def setclass(self, space, w_subtype):
                 # only used by descr_set___class__
                 self.w__class__ = w_subtype
+                if w_subtype.has_del:
+                    self.register_finalizer()
 
             def user_setup(self, space, w_subtype):
                 self.space = space
@@ -303,10 +305,6 @@
                     instance=True)
                 base_user_setup(self, space, w_subtype)
 
-            def setclass(self, space, w_subtype):
-                # only used by descr_set___class__
-                self.w__class__ = w_subtype
-
         add(Proto)
 
     subcls = type(name, (supercls,), body)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to