python/dist/src/Include unicodeobject.h, 2.47, 2.48
Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv780/Include Modified Files: unicodeobject.h Log Message: Correct the handling of 0-termination of PyUnicode_AsWideChar() and its usage in PyLocale_strcoll(). Clarify the documentation on this. Thanks to Andreas Degert for pointing this out. Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.47 retrieving revision 2.48 diff -u -d -r2.47 -r2.48 --- unicodeobject.h 31 Oct 2004 05:46:59 -0000 2.47 +++ unicodeobject.h 22 Nov 2004 13:02:29 -0000 2.48 @@ -512,10 +512,16 @@ 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(
participants (1)
-
lemburgļ¼ users.sourceforge.net