Author: Armin Rigo <ar...@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) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit