mirror of
https://github.com/python/cpython.git
synced 2026-10-28 10:25:05 +08:00
gh-159580: use _Py_INCREF_TYPE in object.__class__ (#160424)
This commit is contained in:
1 parent
ed797baf68
commit
b1e32ff4f3
1 file changed
+3
-1
@@ -7472,7 +7472,9 @@ _Py_BaseObject_RichCompare(PyObject* self, PyObject* other, int op)
|
||||
static PyObject *
|
||||
object_get_class(PyObject *self, void *closure)
|
||||
{
|
||||
return Py_NewRef(Py_TYPE(self));
|
||||
PyTypeObject *type = Py_TYPE(self);
|
||||
_Py_INCREF_TYPE(type);
|
||||
return (PyObject *)type;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in new issue
Block a user