[pypy-svn] r27266 - pypy/dist/pypy/module/_pickle_support
ericvrp at codespeak.net
ericvrp at codespeak.net
Tue May 16 13:39:47 CEST 2006
Author: ericvrp
Date: Tue May 16 13:39:46 2006
New Revision: 27266
Modified:
pypy/dist/pypy/module/_pickle_support/maker.py
Log:
temp check-in for debugging
Modified: pypy/dist/pypy/module/_pickle_support/maker.py
==============================================================================
--- pypy/dist/pypy/module/_pickle_support/maker.py (original)
+++ pypy/dist/pypy/module/_pickle_support/maker.py Tue May 16 13:39:46 2006
@@ -36,20 +36,26 @@
method_new.unwrap_spec = [ObjSpace, Arguments]
#XXX this does not work yet
-def dictiter_new(space, w_dictitertype, __args__):
- raise Exception('No dictiter_new (pickle support) yet')
- print "dictiter_new here 1)", space, w_dictitertype
- #w_type = space.gettypeobject(dictiter_typedef)
- #print "dictiter_new here 2)", w_type
- #a = space.call_args(w_type, __args__)
- #print "dictiter_new here 3)", a
- #return a
- from pypy.objspace.std.dictobject import W_DictIterObject
- w_obj = space.allocate_instance(W_DictIterObject, w_dictitertype)
- print "dictiter_new here 2)", w_obj
- W_DictIterObject.__init__(w_obj, space)
- print "dictiter_new here 3)", w_obj
- return w_obj
+def dictiter_new(space, w_dictitertype, __args__=None):
+ #raise Exception('No dictiter_new (pickle support) yet')
+ print "dictiter_new here 0)", space, w_dictitertype, __args__
+ print "XXX", str(dictiter_typedef)
+ if False:
+ w_type = space.gettypeobject(dictiter_typedef)
+ print "dictiter_new here 2)", w_type
+ a = space.call_args(w_type, __args__)
+ print "dictiter_new here 3)", a
+ return a
+ else:
+ from pypy.objspace.std.dictobject import W_DictIterObject
+ print "dictiter_new here 1)", space, w_dictitertype, __args__
+ #import pdb;pdb.set_trace()
+ if space.is_true(space.issubtype(w_dictitertype, W_DictIterObject)):
+ w_obj = space.allocate_instance(W_DictIterObject, w_dictitertype)
+ print "dictiter_new here 2)", w_obj
+ W_DictIterObject.__init__(w_obj, space)
+ print "dictiter_new here 3)", w_obj
+ return w_obj
dictiter_new.unwrap_spec = [ObjSpace, W_Root, Arguments]
#XXX this doesn't work either
More information about the Pypy-commit
mailing list