]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove redundant var in PyErr_NewException() (GH-20850)
authorHai Shi <shihai1992@gmail.com>
Sat, 13 Jun 2020 06:58:12 +0000 (14:58 +0800)
committerGitHub <noreply@github.com>
Sat, 13 Jun 2020 06:58:12 +0000 (15:58 +0900)
Python/errors.c

index 5d1725679c4bdc25b39de7583c919989cc7acb62..cc00ae4a5407b87bfef9500e21fe46ac62b1f11c 100644 (file)
@@ -1079,7 +1079,6 @@ PyErr_NewException(const char *name, PyObject *base, PyObject *dict)
 {
     PyThreadState *tstate = _PyThreadState_GET();
     PyObject *modulename = NULL;
-    PyObject *classname = NULL;
     PyObject *mydict = NULL;
     PyObject *bases = NULL;
     PyObject *result = NULL;
@@ -1125,7 +1124,6 @@ PyErr_NewException(const char *name, PyObject *base, PyObject *dict)
   failure:
     Py_XDECREF(bases);
     Py_XDECREF(mydict);
-    Py_XDECREF(classname);
     Py_XDECREF(modulename);
     return result;
 }