[pypy-svn] r74407 - in pypy/trunk/pypy/module/cpyext: . test

afa at codespeak.net afa at codespeak.net
Thu May 6 13:27:21 CEST 2010


Author: afa
Date: Thu May  6 13:27:20 2010
New Revision: 74407

Modified:
   pypy/trunk/pypy/module/cpyext/pyobject.py
   pypy/trunk/pypy/module/cpyext/test/test_cpyext.py
   pypy/trunk/pypy/module/cpyext/typeobject.py
Log:
Rename member to follow convention


Modified: pypy/trunk/pypy/module/cpyext/pyobject.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/pyobject.py	(original)
+++ pypy/trunk/pypy/module/cpyext/pyobject.py	Thu May  6 13:27:20 2010
@@ -152,7 +152,7 @@
         self.py_objects_r2w = {} # { addr of raw PyObject -> w_obj }
         self.borrow_mapping = {} # { addr of container -> { addr of containee -> None } }
         self.borrowed_objects = {} # { addr of containee -> None }
-        self.non_heaptypes = [] # list of wrapped objects
+        self.non_heaptypes_w = []
 
     def _freeze_(self):
         assert not self.borrowed_objects and not self.borrow_mapping

Modified: pypy/trunk/pypy/module/cpyext/test/test_cpyext.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/test_cpyext.py	(original)
+++ pypy/trunk/pypy/module/cpyext/test/test_cpyext.py	Thu May  6 13:27:20 2010
@@ -138,7 +138,7 @@
         from pypy.module.imp.importing import importhook
         importhook(cls.space, "os") # warm up reference counts
         state = cls.space.fromcache(RefcountState)
-        state.non_heaptypes[:] = []
+        state.non_heaptypes_w[:] = []
 
     def compile_module(self, name, **kwds):
         """
@@ -262,9 +262,9 @@
         for name in self.imported_module_names:
             self.unimport_module(name)
         state = self.space.fromcache(RefcountState)
-        for w_obj in state.non_heaptypes:
+        for w_obj in state.non_heaptypes_w:
             Py_DecRef(self.space, w_obj)
-        state.non_heaptypes[:] = []
+        state.non_heaptypes_w[:] = []
         while state.borrowed_objects:
             addr, _ = state.borrowed_objects.popitem()
             w_obj = state.py_objects_r2w[addr]

Modified: pypy/trunk/pypy/module/cpyext/typeobject.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/typeobject.py	(original)
+++ pypy/trunk/pypy/module/cpyext/typeobject.py	Thu May  6 13:27:20 2010
@@ -581,7 +581,7 @@
     finish_type_2(space, py_type, w_obj)
 
     state = space.fromcache(RefcountState)
-    state.non_heaptypes.append(w_obj)
+    state.non_heaptypes_w.append(w_obj)
 
     return w_obj
 



More information about the Pypy-commit mailing list