Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize

with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
This commit is contained in:
Serhiy Storchaka 2016-11-20 09:13:07 +02:00
parent e20973926a
commit 06515833fe
31 changed files with 62 additions and 62 deletions

View file

@ -465,7 +465,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
pysqlite_statement_reset(self->statement);
}
operation_cstr = _PyUnicode_AsStringAndSize(operation, &operation_len);
operation_cstr = PyUnicode_AsUTF8AndSize(operation, &operation_len);
if (operation_cstr == NULL)
goto error;
@ -689,7 +689,7 @@ PyObject* pysqlite_cursor_executescript(pysqlite_Cursor* self, PyObject* args)
self->reset = 0;
if (PyUnicode_Check(script_obj)) {
script_cstr = _PyUnicode_AsString(script_obj);
script_cstr = PyUnicode_AsUTF8(script_obj);
if (!script_cstr) {
return NULL;
}