diff options
author | Gerhard Häring <gh@ghaering.de> | 2007-08-10 18:15:11 (GMT) |
---|---|---|
committer | Gerhard Häring <gh@ghaering.de> | 2007-08-10 18:15:11 (GMT) |
commit | 6d21456137836b8acd551cf6a51999ad4ff10a91 (patch) | |
tree | a9cdbf533531b1326623f704e6155350dddb0b17 /Modules/_sqlite/statement.c | |
parent | bd4a63e091ddb38a2d55d9c21eee8656863240ca (diff) | |
download | cpython-6d21456137836b8acd551cf6a51999ad4ff10a91.zip cpython-6d21456137836b8acd551cf6a51999ad4ff10a91.tar.gz cpython-6d21456137836b8acd551cf6a51999ad4ff10a91.tar.bz2 |
Make the sqlite tests pass.
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 { |