summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-22 08:13:20 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-22 08:13:20 (GMT)
commite79ec70801e410de9c3110ffe78f98e08114ae16 (patch)
tree4dffcd5f09a018f6b67feaeab43963aed6726eab /Modules/_sqlite
parent5cbd8331ff567ee568713dc5e63820ffb453ac4b (diff)
parent08d230a5408e9fac3adbb357f5fb4a43958991d4 (diff)
downloadcpython-e79ec70801e410de9c3110ffe78f98e08114ae16.zip
cpython-e79ec70801e410de9c3110ffe78f98e08114ae16.tar.gz
cpython-e79ec70801e410de9c3110ffe78f98e08114ae16.tar.bz2
Issue #24257: Fixed incorrect uses of PyObject_IsInstance().
Fixed segmentation fault in sqlite3.Row constructor with faked cursor type. Fixed system error in the comparison of faked types.SimpleNamespace.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/row.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index d863643..07584e3 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -46,7 +46,7 @@ pysqlite_row_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
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;
}