summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite/cursor.c')
-rw-r--r--Modules/_sqlite/cursor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 9c295a6..55a1ffc 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -497,8 +497,10 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
rc = pysqlite_statement_reset(self->statement);
}
- if (PyObject_AsCharBuffer(operation, &operation_cstr, &operation_len) < 0)
+ operation_cstr = PyUnicode_AsString(operation);
+ if (operation == NULL)
goto error;
+ operation_len = strlen(operation_cstr); /* XXX */
/* reset description and rowcount */
Py_DECREF(self->description);