[pypy-commit] pypy jit-frontend-unescaped: Backed out changeset 70f26346fd5b

justinpeel noreply at buildbot.pypy.org
Sat Sep 17 08:11:21 CEST 2011


Author: Justin Peel <notmuchtotell at gmail.com>
Branch: jit-frontend-unescaped
Changeset: r47316:2028a5ae9938
Date: 2011-09-17 00:10 -0600
http://bitbucket.org/pypy/pypy/changeset/2028a5ae9938/

Log:	Backed out changeset 70f26346fd5b

diff --git a/pypy/module/pyexpat/interp_pyexpat.py b/pypy/module/pyexpat/interp_pyexpat.py
--- a/pypy/module/pyexpat/interp_pyexpat.py
+++ b/pypy/module/pyexpat/interp_pyexpat.py
@@ -165,7 +165,7 @@
         if id < 0:
             id = global_storage.next_id
             global_storage.next_id += 1
-        global_storage.storage[id] = obj
+        global_storage.storage[id] = weakref.ref(obj)
         return id
 
     @staticmethod
@@ -181,7 +181,7 @@
 class CallbackData(Wrappable):
     def __init__(self, space, parser):
         self.space = space
-        self.parser = weakref.ref(parser)
+        self.parser = parser
 
 SETTERS = {}
 for index, (name, params) in enumerate(HANDLERS.items()):
@@ -256,9 +256,9 @@
     src = py.code.Source("""
     def %(name)s_callback(%(first_arg)s, %(args)s):
         id = rffi.cast(lltype.Signed, %(ll_id)s)
-        userdata = global_storage.get_object(id)
+        userdata = global_storage.get_object(id)()
         space = userdata.space
-        parser = userdata.parser()
+        parser = userdata.parser
 
         handler = parser.handlers[%(index)s]
         if not handler:
@@ -291,9 +291,9 @@
 # and it's not modifiable via user code anyway
 def UnknownEncodingHandlerData_callback(ll_userdata, name, info):
     id = rffi.cast(lltype.Signed, ll_userdata)
-    userdata = global_storage.get_object(id)
+    userdata = global_storage.get_object(id)()
     space = userdata.space
-    parser = userdata.parser()
+    parser = userdata.parser
 
     name = rffi.charp2str(name)
 


More information about the pypy-commit mailing list