cpython: e6502bf289ab (original) (raw)

Mercurial > cpython

changeset 99686:e6502bf289ab 2.7

Issue #20440: Applied yet one patch for using Py_SETREF. The patch is automatically generated, it replaces the code that uses Py_CLEAR. [#20440]

Serhiy Storchaka storchaka@gmail.com
date Sun, 27 Dec 2015 12:38:48 +0200
parents 512a628c683e
children 11670e4be1a9
files Modules/_io/bufferedio.c Modules/_io/textio.c Modules/_struct.c Objects/exceptions.c
diffstat 4 files changed, 33 insertions(+), 57 deletions(-)[+] [-] Modules/_io/bufferedio.c 12 Modules/_io/textio.c 15 Modules/_struct.c 6 Objects/exceptions.c 57

line wrap: on

line diff

--- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -1028,8 +1028,7 @@ found: Py_CLEAR(res); goto end; }

end: LEAVE_BUFFERED(self) @@ -1264,9 +1263,8 @@ bufferedreader_init(buffered *self, PyOb if (_PyIOBase_check_readable(raw, Py_True) == NULL) return -1;

--- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -966,8 +966,7 @@ textiowrapper_init(textio *self, PyObjec "Oi", self->decoder, (int)self->readtranslate); if (incrementalDecoder == NULL) goto error;

@@ -1477,8 +1475,7 @@ textiowrapper_read_chunk(textio *self) goto fail; } Py_DECREF(dec_buffer);

@@ -1836,8 +1832,7 @@ static PyObject * if (chunks != NULL) { if (line != NULL && PyList_Append(chunks, line) < 0) goto error;

--- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -1377,15 +1377,13 @@ s_init(PyObject *self, PyObject *args, P if (PyString_Check(o_format)) { Py_INCREF(o_format);

--- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -62,9 +62,8 @@ BaseException_init(PyBaseExceptionObject Py_SETREF(self->args, args); if (PyTuple_GET_SIZE(self->args) == 1) {

@@ -307,8 +305,7 @@ BaseException_set_args(PyBaseExceptionOb seq = PySequence_Tuple(val); if (!seq) return -1;

@@ -608,19 +605,16 @@ EnvironmentError_init(PyEnvironmentError &myerrno, &strerror, &filename)) { return -1; }

/* self->filename will remain Py_None otherwise */ if (filename != NULL) {

subslice = PyTuple_GetSlice(args, 0, 2); if (!subslice) @@ -877,8 +871,7 @@ WindowsError_init(PyWindowsErrorObject * return -1; posix_errno = winerror_to_errno(errcode);

o_errcode = PyInt_FromLong(posix_errno); if (!o_errcode) @@ -1063,9 +1056,8 @@ SyntaxError_init(PySyntaxErrorObject *se return -1; if (lenargs >= 1) {

@@ -1080,21 +1072,17 @@ SyntaxError_init(PySyntaxErrorObject *se return -1; }

Py_DECREF(info); } @@ -1327,8 +1315,7 @@ set_string(PyObject **attr, const char * PyObject *obj = PyString_FromString(value); if (!obj) return -1;