Author: Matti Picus <[email protected]>
Branch: cpyext-pickle
Changeset: r84860:7ce632bcc863
Date: 2016-06-01 18:29 +0300
http://bitbucket.org/pypy/pypy/changeset/7ce632bcc863/
Log: more simplification (arigato)
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,9 +15,8 @@
def startup(self, space):
space.fromcache(State).startup(space)
- 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):
+ w_obj =
space.gettypefor(pypy.module.cpyext.methodobject.W_PyCFunctionObject)
+ space.appexec([w_obj], """(methodtype):
from pickle import Pickler
Pickler.dispatch[methodtype] = Pickler.save_global
""")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit