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.
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 98cb62e..0f5b06b 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -927,7 +927,7 @@
repr = PyUnicode_FromStringAndSize(NULL, (int)nbytes);
if (repr == NULL)
goto error;
- pdata = (unsigned char *)PyUnicode_AsString(repr);
+ pdata = (unsigned char *)_PyUnicode_AsString(repr);
i = _PyLong_AsByteArray((PyLongObject *)obj,
pdata, nbytes,
1 /* little endian */ , 1 /* signed */ );
@@ -972,7 +972,7 @@
if (repr == NULL)
goto error;
- string = PyUnicode_AsStringAndSize(repr, &size);
+ string = _PyUnicode_AsStringAndSize(repr, &size);
if (string == NULL)
goto error;
@@ -1869,7 +1869,7 @@
/* XXX: Should it check whether the persistent id only contains
ASCII characters? And what if the pid contains embedded
newlines? */
- pid_ascii_bytes = PyUnicode_AsStringAndSize(pid_str, &size);
+ pid_ascii_bytes = _PyUnicode_AsStringAndSize(pid_str, &size);
Py_DECREF(pid_str);
if (pid_ascii_bytes == NULL)
goto error;