mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Add a bunch of GIL release/acquire points in tp_print implementations and for
PyObject_Print(). Closes issue #1164.
This commit is contained in:
parent
d36a60e1e3
commit
0153159e67
13 changed files with 89 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue