Mercurial > cpython-lru_cache-weakref
diff Objects/object.c @ 52868:2bbb60c00eb7 legacy-trunk
#5615: make it possible to configure --without-threads again.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sun, 05 Apr 2009 11:07:14 +0000 |
| parents | af9b6c43804e |
| children | 7790b85e7009 |
line wrap: on
line diff
--- a/Objects/object.c Sun Apr 05 11:06:24 2009 +0000 +++ b/Objects/object.c Sun Apr 05 11:07:14 2009 +0000 @@ -336,11 +336,17 @@ 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"
