summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/unicodeobject.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 0a82caf..6738cbd 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -512,10 +512,16 @@ PyAPI_FUNC(PyObject*) PyUnicode_FromWideChar(
int size /* size of buffer */
);
-/* Copies the Unicode Object contents into the whcar_t buffer w. At
+/* Copies the Unicode Object contents into the wchar_t buffer w. At
most size wchar_t characters are copied.
- Returns the number of wchar_t characters copied or -1 in case of an
+ Note that the resulting wchar_t string may or may not be
+ 0-terminated. It is the responsibility of the caller to make sure
+ that the wchar_t string is 0-terminated in case this is required by
+ the application.
+
+ Returns the number of wchar_t characters copied (excluding a
+ possibly trailing 0-termination character) or -1 in case of an
error. */
PyAPI_FUNC(int) PyUnicode_AsWideChar(