mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix refcounting bug reported by Amaury Forgeot d'Arc.
This commit is contained in:
parent
42dae6a89b
commit
6b18a5bb32
1 changed files with 2 additions and 1 deletions
|
@ -2311,6 +2311,7 @@ object_richcompare(PyObject *self, PyObject *other, int op)
|
|||
|
||||
case Py_EQ:
|
||||
res = (self == other) ? Py_True : Py_False;
|
||||
Py_INCREF(res);
|
||||
break;
|
||||
|
||||
case Py_NE:
|
||||
|
@ -2334,10 +2335,10 @@ object_richcompare(PyObject *self, PyObject *other, int op)
|
|||
|
||||
default:
|
||||
res = Py_NotImplemented;
|
||||
Py_INCREF(res);
|
||||
break;
|
||||
}
|
||||
|
||||
Py_INCREF(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue