summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/connection.c
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2008-08-07 18:54:33 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2008-08-07 18:54:33 (GMT)
commit4cc0f24857c345ba99691b2ae6829c6ce3c0edcd (patch)
treecb4d437c9acb08f213376a499542f2e3bf81b8ad /Modules/_sqlite/connection.c
parent28bd1a3bd5cf7f8c161bddb1735c4968fb9f6a8f (diff)
downloadcpython-4cc0f24857c345ba99691b2ae6829c6ce3c0edcd.zip
cpython-4cc0f24857c345ba99691b2ae6829c6ce3c0edcd.tar.gz
cpython-4cc0f24857c345ba99691b2ae6829c6ce3c0edcd.tar.bz2
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.
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r--Modules/_sqlite/connection.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 1e52918..7b931c0 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -434,7 +434,7 @@ void _pysqlite_set_result(sqlite3_context* context, PyObject* py_val)
} else if (PyFloat_Check(py_val)) {
sqlite3_result_double(context, PyFloat_AsDouble(py_val));
} else if (PyUnicode_Check(py_val)) {
- sqlite3_result_text(context, PyUnicode_AsString(py_val), -1, SQLITE_TRANSIENT);
+ sqlite3_result_text(context, _PyUnicode_AsString(py_val), -1, SQLITE_TRANSIENT);
} else if (PyObject_CheckBuffer(py_val)) {
if (PyObject_AsCharBuffer(py_val, &buffer, &buflen) != 0) {
PyErr_SetString(PyExc_ValueError, "could not convert BLOB to buffer");
@@ -901,7 +901,7 @@ static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, Py
return -1;
}
- statement = PyUnicode_AsStringAndSize(begin_statement, &size);
+ statement = _PyUnicode_AsStringAndSize(begin_statement, &size);
if (!statement) {
Py_DECREF(statement);
return -1;
@@ -1194,7 +1194,7 @@ pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args)
goto finally;
}
- chk = PyUnicode_AsString(uppercase_name);
+ chk = _PyUnicode_AsString(uppercase_name);
while (*chk) {
if ((*chk >= '0' && *chk <= '9')
|| (*chk >= 'A' && *chk <= 'Z')
@@ -1219,7 +1219,7 @@ pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args)
}
rc = sqlite3_create_collation(self->db,
- PyUnicode_AsString(uppercase_name),
+ _PyUnicode_AsString(uppercase_name),
SQLITE_UTF8,
(callable != Py_None) ? callable : NULL,
(callable != Py_None) ? pysqlite_collation_callback : NULL);