Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r2982:7495a3729d42
Date: 2017-06-19 10:12 +0200
http://bitbucket.org/cffi/cffi/changeset/7495a3729d42/

Log:    Py3 compat

diff --git a/cffi/_cffi_errors.h b/cffi/_cffi_errors.h
--- a/cffi/_cffi_errors.h
+++ b/cffi/_cffi_errors.h
@@ -36,7 +36,11 @@
     if (result == NULL)
         goto error;
 
+#if PY_MAJOR_VERSION >= 3
+    bi = PyImport_ImportModule("builtins");
+#else
     bi = PyImport_ImportModule("__builtin__");
+#endif
     if (bi == NULL)
         goto error;
     PyDict_SetItemString(result, "__builtins__", bi);
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to