Fix PyUnicode_AsWideCharString(): set *size if size is not NULL

This commit is contained in:
Victor Stinner 2010-09-29 17:55:12 +00:00
parent 15d597a245
commit 71e91a358b

View file

@ -1215,6 +1215,8 @@ PyUnicode_AsWideCharString(PyUnicodeObject *unicode,
return NULL;
}
unicode_aswidechar(unicode, buffer, buflen);
if (size)
*size = buflen;
return buffer;
}