diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:22:05 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:22:05 (GMT) |
commit | 9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (patch) | |
tree | 642b21e774a9cb2d949e10ce65e7d10326c70138 /Modules/_sqlite/cursor.c | |
parent | 96d02f3c1e145821cd5ce8817d4263e7d8d57e4a (diff) | |
download | cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.zip cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.gz cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.bz2 |
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Modules/_sqlite/cursor.c')
-rw-r--r-- | Modules/_sqlite/cursor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 10ce2e1..4ab8461 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -352,7 +352,7 @@ PyObject* _pysqlite_fetch_one_row(pysqlite_Cursor* self) } PyOS_snprintf(buf, sizeof(buf) - 1, "Could not decode to UTF-8 column '%s' with text '%s'", colname , val_str); - buf_bytes = PyBytes_FromStringAndSize(buf, strlen(buf)); + buf_bytes = PyByteArray_FromStringAndSize(buf, strlen(buf)); if (!buf_bytes) { PyErr_SetString(pysqlite_OperationalError, "Could not decode to UTF-8"); } else { @@ -368,8 +368,8 @@ PyObject* _pysqlite_fetch_one_row(pysqlite_Cursor* self) } } else if (self->connection->text_factory == (PyObject*)&PyString_Type) { converted = PyString_FromString(val_str); - } else if (self->connection->text_factory == (PyObject*)&PyBytes_Type) { - converted = PyBytes_FromStringAndSize(val_str, strlen(val_str)); + } else if (self->connection->text_factory == (PyObject*)&PyByteArray_Type) { + converted = PyByteArray_FromStringAndSize(val_str, strlen(val_str)); } else { converted = PyObject_CallFunction(self->connection->text_factory, "y", val_str); } |