summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-05 11:47:34 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-05 11:47:34 (GMT)
commitdfd734429ec24b6d55b11f48afe4a9bc8f3db730 (patch)
tree69e87b57ac63973e280d9b62c380d1ec09b60bf4 /Objects/object.c
parent0c0daf059bbc63047c7d0821f6e9caa161a17de0 (diff)
downloadcpython-dfd734429ec24b6d55b11f48afe4a9bc8f3db730.zip
cpython-dfd734429ec24b6d55b11f48afe4a9bc8f3db730.tar.gz
cpython-dfd734429ec24b6d55b11f48afe4a9bc8f3db730.tar.bz2
Merge revision 71222 from trunk: #5615: make it possible to configure --without-threads again.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 2cb71dc..14cacb3 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -349,11 +349,17 @@ _PyObject_Dump(PyObject* op)
if (op == NULL)
fprintf(stderr, "NULL\n");
else {
+#ifdef WITH_THREAD
PyGILState_STATE gil;
+#endif
fprintf(stderr, "object : ");
+#ifdef WITH_THREAD
gil = PyGILState_Ensure();
+#endif
(void)PyObject_Print(op, stderr, 0);
+#ifdef WITH_THREAD
PyGILState_Release(gil);
+#endif
/* XXX(twouters) cast refcount to long until %zd is
universally available */
fprintf(stderr, "\n"