Skip to content

Commit 2c045bd

Browse files
authored
bpo-45697: Use PyObject_TypeCheck in type_call (GH-29392)
1 parent e03e503 commit 2c045bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ type_call(PyTypeObject *type, PyObject *args, PyObject *kwds)
11211121

11221122
/* If the returned object is not an instance of type,
11231123
it won't be initialized. */
1124-
if (!PyType_IsSubtype(Py_TYPE(obj), type))
1124+
if (!PyObject_TypeCheck(obj, type))
11251125
return obj;
11261126

11271127
type = Py_TYPE(obj);

0 commit comments

Comments
 (0)