From da7efaa6814a3e5bd264615685244170460465fe Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Fri, 4 Oct 2002 00:09:38 +0000 Subject: [PATCH] Fix errors to pep277 checkin identified by Neal Norwitz. --- Python/errors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Python/errors.c b/Python/errors.c index ccc2ae37bdc..9a2597b0ce1 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -334,7 +334,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename) { PyObject *name = filename ? PyString_FromString(filename) : NULL; PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name); - Py_DECREF(name); + Py_XDECREF(name); return result; } @@ -444,7 +444,7 @@ PyObject *PyErr_SetFromWindowsErrWithFilename( PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject( PyExc_WindowsError, ierr, name); - Py_XDECREF(result); + Py_XDECREF(name); return result; } @@ -459,7 +459,7 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename( PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject( PyExc_WindowsError, ierr, name); - Py_XDECREF(result); + Py_XDECREF(name); return result; } #endif /* Py_WIN_WIDE_FILENAMES */