Skip to content

Commit ef84a10

Browse files
committed
Code review
1 parent b468647 commit ef84a10

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Python/ceval.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,9 +802,8 @@ _PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type,
802802
}
803803
if (match_self) {
804804
// Easy. Copy the subject itself, and move on to kwargs.
805-
Py_NewRef(subject);
806805
assert(PyTuple_GET_ITEM(attrs, 0) == NULL);
807-
PyTuple_SET_ITEM(attrs, 0, subject);
806+
PyTuple_SET_ITEM(attrs, 0, Py_NewRef(subject));
808807
}
809808
else {
810809
for (Py_ssize_t i = 0; i < nargs; i++) {

0 commit comments

Comments
 (0)