]> granicus.if.org Git - python/commitdiff
Remove some unused code in _pysqlite_query_execute() (GH-8495)
authorSergey Fedoseev <fedoseev.sergey@gmail.com>
Fri, 27 Jul 2018 10:06:03 +0000 (15:06 +0500)
committerBerker Peksag <berker.peksag@gmail.com>
Fri, 27 Jul 2018 10:06:03 +0000 (13:06 +0300)
Unused since commit ab994ed8b97e1b0dac151ec827c857f5e7277565.

Modules/_sqlite/cursor.c

index e96f3888b4616327960f7bb2b500ccbd9db1c92c..70b304f4e3fbb84bd5316bca4c3419183e19d6e0 100644 (file)
@@ -378,8 +378,6 @@ static int check_cursor(pysqlite_Cursor* cur)
 PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args)
 {
     PyObject* operation;
-    const char* operation_cstr;
-    Py_ssize_t operation_len;
     PyObject* parameters_list = NULL;
     PyObject* parameters_iter = NULL;
     PyObject* parameters = NULL;
@@ -464,10 +462,6 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
         pysqlite_statement_reset(self->statement);
     }
 
-    operation_cstr = PyUnicode_AsUTF8AndSize(operation, &operation_len);
-    if (operation_cstr == NULL)
-        goto error;
-
     /* reset description and rowcount */
     Py_INCREF(Py_None);
     Py_SETREF(self->description, Py_None);