[issue5035] Compilation --without-threads fails
Antoine Pitrou
report at bugs.python.org
Thu Jan 22 22:27:42 CET 2009
Antoine Pitrou <pitrou at free.fr> added the comment:
The problem seems to have appeared with:
[svn r67802] #3632: the "pyo" macro from gdbinit can now run when the
GIL is released.
Patch by haypo.
diff -r 68d511e1c4bc -r 584e97b40be9 Objects/object.c
--- a/Objects/object.c Mon Dec 15 22:47:57 2008 +0100
+++ b/Objects/object.c Mon Dec 15 23:29:14 2008 +0100
@@ -331,8 +331,11 @@
if (op == NULL)
fprintf(stderr, "NULL\n");
else {
+ PyGILState_STATE gil;
fprintf(stderr, "object : ");
+ gil = PyGILState_Ensure();
(void)PyObject_Print(op, stderr, 0);
+ PyGILState_Release(gil);
/* XXX(twouters) cast refcount to long until %zd is
universally available */
fprintf(stderr, "\n"
----------
nosy: +amaury.forgeotdarc, haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5035>
_______________________________________
More information about the Python-bugs-list
mailing list