diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index 69fb6de..7395b0c 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -336,11 +336,17 @@ void _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" |