diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-09-17 03:28:34 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-09-17 03:28:34 (GMT) |
commit | 0153159e67bf4247c4402a1a6e717819372c9337 (patch) | |
tree | ef58a6813bfb4011b0cd542f250f292f8cba8076 /Objects/complexobject.c | |
parent | d36a60e1e3410450d337d4de732e127e48a6a042 (diff) | |
download | cpython-0153159e67bf4247c4402a1a6e717819372c9337.zip cpython-0153159e67bf4247c4402a1a6e717819372c9337.tar.gz cpython-0153159e67bf4247c4402a1a6e717819372c9337.tar.bz2 |
Add a bunch of GIL release/acquire points in tp_print implementations and for
PyObject_Print().
Closes issue #1164.
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r-- | Objects/complexobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 6d1dbde..7de4d5c 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -341,7 +341,9 @@ complex_print(PyComplexObject *v, FILE *fp, int flags) char buf[100]; complex_to_buf(buf, sizeof(buf), v, (flags & Py_PRINT_RAW) ? PREC_STR : PREC_REPR); + Py_BEGIN_ALLOW_THREADS fputs(buf, fp); + Py_END_ALLOW_THREADS return 0; } |