gh-159580: use _Py_INCREF_TYPE in object.__class__ (#160424)

This commit is contained in:
Kumar Aditya authored and GitHub committed 2026-10-23 08:33:57 +00:00
1 parent ed797baf68
commit b1e32ff4f3
1 file changed
+3 -1
+3 -1
View File
@@ -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