Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked
cursor type.
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index 02373f0..9ebe7b7 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -47,7 +47,7 @@
     if (!PyArg_ParseTuple(args, "OO", &cursor, &data))
         return NULL;
 
-    if (!PyObject_IsInstance((PyObject*)cursor, (PyObject*)&pysqlite_CursorType)) {
+    if (!PyObject_TypeCheck((PyObject*)cursor, &pysqlite_CursorType)) {
         PyErr_SetString(PyExc_TypeError, "instance of cursor required for first argument");
         return NULL;
     }