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);
self->st = NULL;
self->in_use = 0;
- if (PyObject_AsCharBuffer(sql, &sql_cstr, &sql_cstr_len) < 0) {
+ sql_cstr = PyUnicode_AsString(sql);
+ if (sql_cstr == NULL) {
rc = PYSQLITE_SQL_WRONG_TYPE;
return rc;
}
+ sql_cstr_len = strlen(sql_cstr); /* XXX */
self->in_weakreflist = NULL;
Py_INCREF(sql);
Py_ssize_t sql_len;
sqlite3_stmt* new_st;
- if (PyObject_AsCharBuffer(self->sql, &sql_cstr, &sql_len) < 0) {
+ sql_cstr = PyUnicode_AsString(self->sql);
+ if (sql_cstr == NULL) {
rc = PYSQLITE_SQL_WRONG_TYPE;
return rc;
}
+ sql_len = strlen(sql_cstr); /* XXXX */
rc = sqlite3_prepare(self->db,
sql_cstr,