[pypy-svn] r26388 - pypy/dist/pypy/interpreter

ericvrp at codespeak.net ericvrp at codespeak.net
Thu Apr 27 04:48:55 CEST 2006


Author: ericvrp
Date: Thu Apr 27 04:48:54 2006
New Revision: 26388

Modified:
   pypy/dist/pypy/interpreter/baseobjspace.py
   pypy/dist/pypy/interpreter/nestedscope.py
   pypy/dist/pypy/interpreter/typedef.py
Log:
(pedronis, ericvrp)
Fix for annotation problem we had with _pickle_support mixedmodule.



Modified: pypy/dist/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/dist/pypy/interpreter/baseobjspace.py	(original)
+++ pypy/dist/pypy/interpreter/baseobjspace.py	Thu Apr 27 04:48:54 2006
@@ -193,7 +193,7 @@
 
         modules.extend(['unicodedata', '_codecs',
                          'array', 'marshal', 'errno', 'math', '_sre'])
-	#modules.append('_pickle_support')
+	modules.append('_pickle_support')
 
         if self.options.nofaking:
             modules.append('posix')

Modified: pypy/dist/pypy/interpreter/nestedscope.py
==============================================================================
--- pypy/dist/pypy/interpreter/nestedscope.py	(original)
+++ pypy/dist/pypy/interpreter/nestedscope.py	Thu Apr 27 04:48:54 2006
@@ -2,6 +2,7 @@
 from pypy.interpreter.pyopcode import PyInterpFrame
 from pypy.interpreter import function, pycode, pyframe
 from pypy.interpreter.baseobjspace import Wrappable
+from pypy.interpreter.mixedmodule import MixedModule
 
 class Cell(Wrappable):
     "A simple container for a wrapped value."
@@ -35,7 +36,9 @@
         return space.eq(self.w_value, other.w_value)    
         
     def descr__reduce__(self, space):
-        cell_new = space.getbuiltinmodule('_pickle_support').get('cell_new')
+        w_mod    = space.getbuiltinmodule('_pickle_support')
+        mod      = space.interp_w(MixedModule, w_mod)
+        cell_new = mod.get('cell_new')
         if self.w_value is None:    #when would this happen?
             return space.newtuple([cell_new, space.newtuple([])])
         return space.newtuple([cell_new, space.newtuple([]),

Modified: pypy/dist/pypy/interpreter/typedef.py
==============================================================================
--- pypy/dist/pypy/interpreter/typedef.py	(original)
+++ pypy/dist/pypy/interpreter/typedef.py	Thu Apr 27 04:48:54 2006
@@ -543,10 +543,10 @@
     __eq__       = interp2app(Cell.descr__eq__,
                               unwrap_spec=['self', ObjSpace, W_Root]),
     __ne__       = descr_generic_ne,
-##    __reduce__   = interp2app(Cell.descr__reduce__, 
-##                              unwrap_spec=['self', ObjSpace]),
-##    __setstate__ = interp2app(Cell.descr__setstate__,
-##                              unwrap_spec=['self', ObjSpace, W_Root]), 
+    __reduce__   = interp2app(Cell.descr__reduce__, 
+                              unwrap_spec=['self', ObjSpace]),
+    __setstate__ = interp2app(Cell.descr__setstate__,
+                              unwrap_spec=['self', ObjSpace, W_Root]), 
 )
 
 Ellipsis.typedef = TypeDef("Ellipsis", 



More information about the Pypy-commit mailing list