Kaydet (Commit) 3538a310 authored tarafından Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

#3632: the "pyo" macro from gdbinit can now run when the GIL is released.

Patch by haypo.
üst 31949b91
......@@ -185,6 +185,9 @@ Build
C-API
-----
- Issue #3632: from the gdb debugger, the 'pyo' macro can now be called when
the GIL is released, or owned by another thread.
- Issue #4122: On Windows, fix a compilation error when using the
Py_UNICODE_ISSPACE macro in an extension module.
......
......@@ -331,8 +331,11 @@ void _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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment