cpython: 2fd669aa4abc (original) (raw)
Mercurial > cpython
changeset 81876:2fd669aa4abc 3.2
Additional fix for Issue #12268: The io module file object writelines() methods no longer abort early when one of its write system calls is interrupted (EINTR). [#12268]
Gregory P. Smith greg@krypto.org | |
---|---|
date | Fri, 01 Feb 2013 13:03:39 -0800 |
parents | 0c5fa35c9f12 |
children | 81f7bdf7bbb6 30fc620e240e |
files | Misc/NEWS Modules/_io/iobase.c Modules/_io/textio.c |
diffstat | 3 files changed, 12 insertions(+), 3 deletions(-)[+] [-] Misc/NEWS 3 Modules/_io/iobase.c 5 Modules/_io/textio.c 7 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -817,6 +817,9 @@ Library Extension Modules ----------------- +- Issue #12268: The io module file object writelines() methods no longer
- Fix the leak of a dict in the time module when used in an embedded interpreter that is repeatedly initialized and shutdown and reinitialized.
--- a/Modules/_io/iobase.c +++ b/Modules/_io/iobase.c @@ -674,7 +674,10 @@ iobase_writelines(PyObject self, PyObje break; / Stop Iteration */ }
res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);[](#l2.7)
res = NULL;[](#l2.8)
do {[](#l2.9)
res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);[](#l2.10)
} while (res == NULL && _PyIO_trap_eintr());[](#l2.11) Py_DECREF(line);[](#l2.12) if (res == NULL) {[](#l2.13) Py_DECREF(iter);[](#l2.14)
--- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -1249,8 +1249,11 @@ static int Py_DECREF(pending); if (b == NULL) return -1;