Merge revision 71222 from trunk: #5615: make it possible to configure --without-threads again.

This commit is contained in:
Georg Brandl 2009-04-05 11:47:34 +00:00
parent 0c0daf059b
commit dfd734429e
4 changed files with 49 additions and 6 deletions

View file

@ -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"