Mercurial > cpython-lru_cache-weakref
diff Modules/_sqlite/statement.c @ 48660:85b67fb5672b
Rename PyUnicode_AsString -> _PyUnicode_AsString and
PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark
them for interpreter internal use only.
We'll have to rework these APIs or create new ones for the
purpose of accessing the UTF-8 representation of Unicode objects
for 3.1.
| author | Marc-André Lemburg <mal@egenix.com> |
|---|---|
| date | Thu, 07 Aug 2008 18:54:33 +0000 |
| parents | 23ab586c427a |
| children | 8f886acaa142 |
line wrap: on
line diff
--- a/Modules/_sqlite/statement.c Thu Aug 07 18:47:28 2008 +0000 +++ b/Modules/_sqlite/statement.c Thu Aug 07 18:54:33 2008 +0000 @@ -59,7 +59,7 @@ self->st = NULL; self->in_use = 0; - sql_cstr = PyUnicode_AsStringAndSize(sql, &sql_cstr_len); + sql_cstr = _PyUnicode_AsStringAndSize(sql, &sql_cstr_len); if (sql_cstr == NULL) { rc = PYSQLITE_SQL_WRONG_TYPE; return rc; @@ -140,7 +140,7 @@ rc = sqlite3_bind_double(self->st, pos, PyFloat_AsDouble(parameter)); break; case TYPE_UNICODE: - string = PyUnicode_AsString(parameter); + string = _PyUnicode_AsString(parameter); rc = sqlite3_bind_text(self->st, pos, string, -1, SQLITE_TRANSIENT); break; case TYPE_BUFFER: @@ -296,7 +296,7 @@ Py_ssize_t sql_len; sqlite3_stmt* new_st; - sql_cstr = PyUnicode_AsStringAndSize(self->sql, &sql_len); + sql_cstr = _PyUnicode_AsStringAndSize(self->sql, &sql_len); if (sql_cstr == NULL) { rc = PYSQLITE_SQL_WRONG_TYPE; return rc;
