[Python-checkins] Remove redundant var in PyErr_NewException() (GH-20850)

Hai Shi webhook-mailer at python.org
Sat Jun 13 02:58:24 EDT 2020


https://github.com/python/cpython/commit/1c209e3b53b6929747fe3b79398bfbaeabb72d92
commit: 1c209e3b53b6929747fe3b79398bfbaeabb72d92
branch: master
author: Hai Shi <shihai1992 at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-06-13T15:58:12+09:00
summary:

Remove redundant var in PyErr_NewException() (GH-20850)

files:
M Python/errors.c

diff --git a/Python/errors.c b/Python/errors.c
index 5d1725679c4bd..cc00ae4a5407b 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -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;
 }



More information about the Python-checkins mailing list