diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index 2c43221a1e..b14e52aade 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -344,8 +344,11 @@ _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" |