[pypy-commit] pypy default: remerge cpyext-pickle with the problematic bit backed out

arigo pypy.commits at gmail.com
Thu Jun 2 05:22:21 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r84878:8ad62753199e
Date: 2016-06-02 11:23 +0200
http://bitbucket.org/pypy/pypy/changeset/8ad62753199e/

Log:	remerge cpyext-pickle with the problematic bit backed out

diff --git a/pypy/module/cpyext/__init__.py b/pypy/module/cpyext/__init__.py
--- a/pypy/module/cpyext/__init__.py
+++ b/pypy/module/cpyext/__init__.py
@@ -15,8 +15,9 @@
 
     def startup(self, space):
         space.fromcache(State).startup(space)
-        w_obj = space.gettypefor(pypy.module.cpyext.methodobject.W_PyCFunctionObject)
-        space.appexec([w_obj], """(methodtype):
+        method = pypy.module.cpyext.typeobject.get_new_method_def(space)
+        w_obj = pypy.module.cpyext.methodobject.W_PyCFunctionObject(space, method, space.wrap(''))
+        space.appexec([space.type(w_obj)], """(methodtype):
             from pickle import Pickler 
             Pickler.dispatch[methodtype] = Pickler.save_global
         """)


More information about the pypy-commit mailing list