[pypy-commit] pypy cpyext-pickle: more simplification (arigato)
mattip
pypy.commits at gmail.com
Wed Jun 1 11:30:07 EDT 2016
Author: Matti Picus <matti.picus at gmail.com>
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
""")
More information about the pypy-commit
mailing list