mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Merge revision 71222 from trunk: #5615: make it possible to configure --without-threads again.
This commit is contained in:
parent
0c0daf059b
commit
dfd734429e
4 changed files with 49 additions and 6 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue