Kaydet (Commit) da7efaa6 authored tarafından Mark Hammond's avatar Mark Hammond

Fix errors to pep277 checkin identified by Neal Norwitz.

üst 7995eb22
...@@ -334,7 +334,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename) ...@@ -334,7 +334,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename)
{ {
PyObject *name = filename ? PyString_FromString(filename) : NULL; PyObject *name = filename ? PyString_FromString(filename) : NULL;
PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name); PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name);
Py_DECREF(name); Py_XDECREF(name);
return result; return result;
} }
...@@ -444,7 +444,7 @@ PyObject *PyErr_SetFromWindowsErrWithFilename( ...@@ -444,7 +444,7 @@ PyObject *PyErr_SetFromWindowsErrWithFilename(
PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject( PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject(
PyExc_WindowsError, PyExc_WindowsError,
ierr, name); ierr, name);
Py_XDECREF(result); Py_XDECREF(name);
return result; return result;
} }
...@@ -459,7 +459,7 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename( ...@@ -459,7 +459,7 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject( PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject(
PyExc_WindowsError, PyExc_WindowsError,
ierr, name); ierr, name);
Py_XDECREF(result); Py_XDECREF(name);
return result; return result;
} }
#endif /* Py_WIN_WIDE_FILENAMES */ #endif /* Py_WIN_WIDE_FILENAMES */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment