Commits

Armin Rigo committed 89bcb5d

Fixes

  • Participants
  • Parent commits 8896103
  • Branches gc-del

Comments (0)

Files changed (2)

pypy/module/_cffi_backend/ccallback.py

         if rffi.cast(lltype.Signed, res) != clibffi.FFI_OK:
             raise OperationError(space.w_SystemError,
                 space.wrap("libffi failed to build this callback"))
+        #
+        self.register_finalizer()
 
     def get_closure(self):
         return rffi.cast(clibffi.FFI_CLOSUREP, self._cdata)
 
-    #@rgc.must_be_light_finalizer
-    def __del__(self):
+    def invoke_finalizer(self):
         clibffi.closureHeap.free(self.get_closure())
         if self.ll_error:
             lltype.free(self.ll_error, flavor='raw')

pypy/module/_hashlib/interp_hashlib.py

         except:
             lltype.free(ctx, flavor='raw')
             raise
+        self.register_finalizer()
 
-    def __del__(self):
+    def invoke_finalizer(self):
         if self.ctx:
             ropenssl.EVP_MD_CTX_cleanup(self.ctx)
             lltype.free(self.ctx, flavor='raw')