diff options
Diffstat (limited to 'Modules/_sqlite/statement.c')
-rw-r--r-- | Modules/_sqlite/statement.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index 5987b2a..b80b955 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -113,7 +113,8 @@ int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObjec rc = sqlite3_bind_text(self->st, pos, string, -1, SQLITE_TRANSIENT); } else if PyUnicode_Check(parameter) { stringval = PyUnicode_AsUTF8String(parameter); - string = PyString_AsString(stringval); + string = PyBytes_AsString(stringval); + rc = sqlite3_bind_text(self->st, pos, string, -1, SQLITE_TRANSIENT); Py_DECREF(stringval); } else { |