[pypy-commit] cffi default: Must initialize threads when we have callbacks. That's obscure,

arigo noreply at buildbot.pypy.org
Thu Sep 27 10:49:03 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r975:caae153920ef
Date: 2012-09-27 10:48 +0200
http://bitbucket.org/cffi/cffi/changeset/caae153920ef/

Log:	Must initialize threads when we have callbacks. That's obscure, but
	done by ctypes too.

diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -3888,6 +3888,9 @@
         goto error;
     }
     assert(closure->user_data == infotuple);
+#ifdef WITH_THREAD
+    PyEval_InitThreads();
+#endif
     return (PyObject *)cd;
 
  error:


More information about the pypy-commit mailing list