summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-12-15 22:29:14 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-12-15 22:29:14 (GMT)
commit3538a3107a459259fe106e1fa5c9fb8dcf8e18b5 (patch)
tree6d94c0787573b83a7da7c6ed73d23835534f6e7b /Objects/object.c
parent31949b9108088b1ad0efd9d518029b6980b191e9 (diff)
downloadcpython-3538a3107a459259fe106e1fa5c9fb8dcf8e18b5.zip
cpython-3538a3107a459259fe106e1fa5c9fb8dcf8e18b5.tar.gz
cpython-3538a3107a459259fe106e1fa5c9fb8dcf8e18b5.tar.bz2
#3632: the "pyo" macro from gdbinit can now run when the GIL is released.
Patch by haypo.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 9cd34b8..c882cf2 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -331,8 +331,11 @@ void _PyObject_Dump(PyObject* op)
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"