Fix errors to pep277 checkin identified by Neal Norwitz.

This commit is contained in:
Mark Hammond 2002-10-04 00:09:38 +00:00
parent 7995eb22f1
commit da7efaa681
1 changed files with 3 additions and 3 deletions

View File

@ -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(
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(
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 */