[pypy-commit] cffi release-1.12: Windows fix
arigo
pypy.commits at gmail.com
Fri Apr 19 11:44:21 EDT 2019
Author: Armin Rigo <arigo at tunes.org>
Branch: release-1.12
Changeset: r3265:4f23de94bc49
Date: 2019-04-19 17:44 +0200
http://bitbucket.org/cffi/cffi/changeset/4f23de94bc49/
Log: Windows fix
diff --git a/cffi/_embedding.h b/cffi/_embedding.h
--- a/cffi/_embedding.h
+++ b/cffi/_embedding.h
@@ -145,6 +145,7 @@
int result;
PyGILState_STATE state;
PyObject *pycode=NULL, *global_dict=NULL, *x;
+ PyObject *builtins;
state = PyGILState_Ensure();
@@ -169,7 +170,7 @@
global_dict = PyDict_New();
if (global_dict == NULL)
goto error;
- PyObject *builtins = PyEval_GetBuiltins();
+ builtins = PyEval_GetBuiltins();
if (builtins == NULL)
goto error;
if (PyDict_SetItemString(global_dict, "__builtins__", builtins) < 0)
diff --git a/testing/embedding/test_basic.py b/testing/embedding/test_basic.py
--- a/testing/embedding/test_basic.py
+++ b/testing/embedding/test_basic.py
@@ -63,8 +63,8 @@
output = popen.stdout.read()
err = popen.wait()
if err:
- raise OSError("popen failed with exit code %r: %r" % (
- err, args))
+ raise OSError(("popen failed with exit code %r: %r\n\n%s" % (
+ err, args, output)).rstrip())
print(output.rstrip())
return output
More information about the pypy-commit
mailing list