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/intobject.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/intobject.c')
| -rw-r--r-- | Objects/intobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index c4aeed5..364947e 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -425,7 +425,10 @@ static int int_print(PyIntObject *v, FILE *fp, int flags) /* flags -- not used but required by interface */ { - fprintf(fp, "%ld", v->ob_ival); + long int_val = v->ob_ival; + Py_BEGIN_ALLOW_THREADS + fprintf(fp, "%ld", int_val); + Py_END_ALLOW_THREADS return 0; } |
