summaryrefslogtreecommitdiffstats
path: root/Include/unicodeobject.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-12-27 01:49:29 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-12-27 01:49:29 (GMT)
commitdc2081f72bfef321f60548da4353e7fe91e35e4d (patch)
treed98975d0d653b3b25cae4017a98cc7cad98e0dc4 /Include/unicodeobject.h
parent555a24f206e4d310feb55ddb03cb7eba12d901e7 (diff)
downloadcpython-dc2081f72bfef321f60548da4353e7fe91e35e4d.zip
cpython-dc2081f72bfef321f60548da4353e7fe91e35e4d.tar.gz
cpython-dc2081f72bfef321f60548da4353e7fe91e35e4d.tar.bz2
Issue #9738: document encodings of unicode functions
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r--Include/unicodeobject.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index ad24066..1f79efd 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -443,14 +443,14 @@ PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
/* Similar to PyUnicode_FromUnicode(), but u points to UTF-8 encoded bytes */
PyAPI_FUNC(PyObject*) PyUnicode_FromStringAndSize(
- const char *u, /* char buffer */
- Py_ssize_t size /* size of buffer */
+ const char *u /* UTF-8 encoded string */
+ Py_ssize_t size /* size of buffer */
);
/* Similar to PyUnicode_FromUnicode(), but u points to null-terminated
UTF-8 encoded bytes */
PyAPI_FUNC(PyObject*) PyUnicode_FromString(
- const char *u /* string */
+ const char *u /* UTF-8 encoded string */
);
/* Return a read-only pointer to the Unicode object's internal
@@ -551,7 +551,9 @@ PyAPI_FUNC(PyObject *) _PyUnicode_FormatAdvanced(PyObject *obj,
PyAPI_FUNC(void) PyUnicode_InternInPlace(PyObject **);
PyAPI_FUNC(void) PyUnicode_InternImmortal(PyObject **);
-PyAPI_FUNC(PyObject *) PyUnicode_InternFromString(const char *);
+PyAPI_FUNC(PyObject *) PyUnicode_InternFromString(
+ const char *u /* UTF-8 encoded string */
+ );
#ifndef Py_LIMITED_API
PyAPI_FUNC(void) _Py_ReleaseInternedUnicodeStrings(void);
#endif
@@ -1455,7 +1457,7 @@ PyAPI_FUNC(int) PyUnicode_Compare(
PyAPI_FUNC(int) PyUnicode_CompareWithASCIIString(
PyObject *left,
- const char *right
+ const char *right /* ASCII-encoded string */
);
/* Rich compare two strings and return one of the following: