diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-22 08:02:49 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-22 08:02:49 (GMT) |
commit | 08d230a5408e9fac3adbb357f5fb4a43958991d4 (patch) | |
tree | 94e66616cc67b6d1164d87f9bf694a6850b982ff /Modules/_sqlite | |
parent | df9ba3623a1fcb745199b723ffd68e63f7a31153 (diff) | |
download | cpython-08d230a5408e9fac3adbb357f5fb4a43958991d4.zip cpython-08d230a5408e9fac3adbb357f5fb4a43958991d4.tar.gz cpython-08d230a5408e9fac3adbb357f5fb4a43958991d4.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index 64dfd06..ee73446 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; } |