Straggler (forgot to save this earlier).
authorGuido van Rossum <guido@python.org>
Wed, 29 Aug 2007 14:26:02 +0000 (14:26 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 29 Aug 2007 14:26:02 +0000 (14:26 +0000)
Modules/_sqlite/cursor.c

index 55a1ffc834a08b13da2a404cedc78dfca8837d4b..c468754e75fe2945c2a166d706f3a57ebea6b4ef 100644 (file)
@@ -497,10 +497,9 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
         rc = pysqlite_statement_reset(self->statement);
     }
 
-    operation_cstr = PyUnicode_AsString(operation);
+    operation_cstr = PyUnicode_AsStringAndSize(operation, &operation_len);
     if (operation == NULL)
         goto error;
-    operation_len = strlen(operation_cstr); /* XXX */
 
     /* reset description and rowcount */
     Py_DECREF(self->description);