diff options
author | Marc-André Lemburg <mal@egenix.com> | 2008-08-07 18:54:33 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2008-08-07 18:54:33 (GMT) |
commit | 4cc0f24857c345ba99691b2ae6829c6ce3c0edcd (patch) | |
tree | cb4d437c9acb08f213376a499542f2e3bf81b8ad /Modules/_pickle.c | |
parent | 28bd1a3bd5cf7f8c161bddb1735c4968fb9f6a8f (diff) | |
download | cpython-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/_pickle.c')
-rw-r--r-- | Modules/_pickle.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ save_long(PicklerObject *self, PyObject *obj) 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 @@ save_long(PicklerObject *self, PyObject *obj) if (repr == NULL) goto error; - string = PyUnicode_AsStringAndSize(repr, &size); + string = _PyUnicode_AsStringAndSize(repr, &size); if (string == NULL) goto error; @@ -1869,7 +1869,7 @@ save_pers(PicklerObject *self, PyObject *obj, PyObject *func) /* 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; |