[pypy-svn] r10012 - pypy/dist/pypy/objspace/std

tismer at codespeak.net tismer at codespeak.net
Mon Mar 21 20:18:47 CET 2005


Author: tismer
Date: Mon Mar 21 20:18:46 2005
New Revision: 10012

Modified:
   pypy/dist/pypy/objspace/std/inttype.py
Log:
__getnewargs__ to make pickle and Samuele's tool happy

Modified: pypy/dist/pypy/objspace/std/inttype.py
==============================================================================
--- pypy/dist/pypy/objspace/std/inttype.py	(original)
+++ pypy/dist/pypy/objspace/std/inttype.py	Mon Mar 21 20:18:46 2005
@@ -67,8 +67,12 @@
         w_obj.__init__(space, value)
         return w_obj
 
+def descr__getnewargs__(space, w_obj):
+    from pypy.objspace.std.intobject import W_IntObject
+    return space.newtuple([W_IntObject(space, w_obj.intval)])
 # ____________________________________________________________
 
 int_typedef = StdTypeDef("int",
     __new__ = newmethod(descr__new__),
+    __getnewargs__ = newmethod(descr__getnewargs__),
     )



More information about the Pypy-commit mailing list