[Python-checkins] cpython (3.3): let's not return NULL from functions that should return ints
Eric V. Smith
eric at trueblade.com
Mon Jul 22 04:05:29 CEST 2013
On 7/21/2013 4:27 PM, benjamin.peterson wrote:
> @@ -267,7 +267,7 @@
> Py_DECREF(io);
> Py_DECREF(binary);
> PyMem_FREE(found_encoding);
> - return PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, filename);
> + return 0;
> }
> fob = _PyObject_CallMethodId(io, &PyId_TextIOWrapper, "Os", binary, encoding);
> Py_DECREF(io);
Did you mean to remove the call to PyErr_SetFromErrnoWithFilenameObject?
Or just call it, then ignore its return value and return 0?
--
Eric.
More information about the Python-checkins
mailing list