[pypy-svn] r74416 - pypy/trunk/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Thu May 6 15:50:08 CEST 2010


Author: afa
Date: Thu May  6 15:50:07 2010
New Revision: 74416

Modified:
   pypy/trunk/pypy/module/cpyext/__init__.py
Log:
fix translation


Modified: pypy/trunk/pypy/module/cpyext/__init__.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/__init__.py	(original)
+++ pypy/trunk/pypy/module/cpyext/__init__.py	Thu May  6 15:50:07 2010
@@ -23,13 +23,15 @@
     def startup(self, space):
         state = space.fromcache(State)
         from pypy.module.cpyext.typeobject import setup_new_method_def
+        from pypy.module.cpyext.pyobject import RefcountState
         setup_new_method_def(space)
         if not we_are_translated():
             space.setattr(space.wrap(self),
                           space.wrap('api_lib'),
                           space.wrap(state.api_lib))
         else:
-            state.init_r2w_from_w2r()
+            refcountstate = space.fromcache(RefcountState)
+            refcountstate.init_r2w_from_w2r()
 
         for func in api.INIT_FUNCTIONS:
             func(space)



More information about the Pypy-commit mailing list