summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-06 00:01:29 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-06 00:01:29 (GMT)
commitf955eb210fef42cabd831211177e646f27dd698f (patch)
tree83ca92ed4318dc88995bc4a25486c44a6c535ba7 /Objects/unicodeobject.c
parent71e44cb97ffaaa3a777477aa6dcb0b0f29c9eda4 (diff)
parentd88d9836c541258a46acb153cd488de2a04b60db (diff)
downloadcpython-f955eb210fef42cabd831211177e646f27dd698f.zip
cpython-f955eb210fef42cabd831211177e646f27dd698f.tar.gz
cpython-f955eb210fef42cabd831211177e646f27dd698f.tar.bz2
Merge 3.2: Fix PyUnicode_AsWideCharString() doc
- Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character - Fix spelling of the null character
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 94b7b61..174455f 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1204,12 +1204,12 @@ PyUnicode_FromFormat(const char *format, ...)
/* Helper function for PyUnicode_AsWideChar() and PyUnicode_AsWideCharString():
convert a Unicode object to a wide character string.
- - If w is NULL: return the number of wide characters (including the nul
+ - If w is NULL: return the number of wide characters (including the null
character) required to convert the unicode object. Ignore size argument.
- - Otherwise: return the number of wide characters (excluding the nul
+ - Otherwise: return the number of wide characters (excluding the null
character) written into w. Write at most size wide characters (including
- the nul character). */
+ the null character). */
static Py_ssize_t
unicode_aswidechar(PyUnicodeObject *unicode,
wchar_t *w,
@@ -1257,7 +1257,7 @@ unicode_aswidechar(PyUnicodeObject *unicode,
return w - worig;
}
else {
- nchar = 1; /* nul character at the end */
+ nchar = 1; /* null character at the end */
while (u != uend) {
if (0xD800 <= u[0] && u[0] <= 0xDBFF
&& 0xDC00 <= u[1] && u[1] <= 0xDFFF)
@@ -1295,7 +1295,7 @@ unicode_aswidechar(PyUnicodeObject *unicode,
return w - worig;
}
else {
- nchar = 1; /* nul character */
+ nchar = 1; /* null character */
while (u != uend) {
if (*u > 0xffff)
nchar += 2;