[pypy-commit] pypy cffi-static-callback-embedding: update to cffi/1c789b36273d

arigo pypy.commits at gmail.com
Thu Jan 7 04:19:53 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-static-callback-embedding
Changeset: r81602:455a5e6e72ea
Date: 2016-01-07 10:18 +0100
http://bitbucket.org/pypy/pypy/changeset/455a5e6e72ea/

Log:	update to cffi/1c789b36273d

diff --git a/pypy/module/_cffi_backend/cffi1_module.py b/pypy/module/_cffi_backend/cffi1_module.py
--- a/pypy/module/_cffi_backend/cffi1_module.py
+++ b/pypy/module/_cffi_backend/cffi1_module.py
@@ -45,4 +45,3 @@
     w_modules_dict = space.sys.get('modules')
     space.setitem(w_modules_dict, w_name, space.wrap(module))
     space.setitem(w_modules_dict, space.wrap(name + '.lib'), space.wrap(lib))
-    return module
diff --git a/pypy/module/_cffi_backend/embedding.py b/pypy/module/_cffi_backend/embedding.py
--- a/pypy/module/_cffi_backend/embedding.py
+++ b/pypy/module/_cffi_backend/embedding.py
@@ -32,13 +32,12 @@
         os_thread.setup_threads(space)
     #
     name = rffi.charp2str(init_struct.name)
-    module = load_cffi1_module(space, name, None, init_struct.func)
+    load_cffi1_module(space, name, None, init_struct.func)
     code = rffi.charp2str(init_struct.code)
     compiler = space.createcompiler()
     pycode = compiler.compile(code, "<init code for '%s'>" % name, 'exec', 0)
-    w_globals = module.getdict(space)
-    space.call_method(w_globals, "setdefault", space.wrap("__builtins__"),
-                      space.wrap(space.builtin))
+    w_globals = space.newdict(module=True)
+    space.setitem_str(w_globals, "__builtins__", space.wrap(space.builtin))
     pycode.exec_code(space, w_globals, w_globals)
 
 


More information about the pypy-commit mailing list