summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c
index dd68ecd..f6d125f 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -271,14 +271,18 @@ internal_print(PyObject *op, FILE *fp, int flags, int nesting)
#endif
clearerr(fp); /* Clear any previous error condition */
if (op == NULL) {
+ Py_BEGIN_ALLOW_THREADS
fprintf(fp, "<nil>");
+ Py_END_ALLOW_THREADS
}
else {
if (op->ob_refcnt <= 0)
/* XXX(twouters) cast refcount to long until %zd is
universally available */
+ Py_BEGIN_ALLOW_THREADS
fprintf(fp, "<refcnt %ld at %p>",
(long)op->ob_refcnt, op);
+ Py_END_ALLOW_THREADS
else {
PyObject *s;
if (flags & Py_PRINT_RAW)