From: Victor Stinner Date: Wed, 29 Sep 2010 17:55:12 +0000 (+0000) Subject: Fix PyUnicode_AsWideCharString(): set *size if size is not NULL X-Git-Tag: v3.2a3~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71e91a358ba0b99319fb6553016094925937e031;p=python Fix PyUnicode_AsWideCharString(): set *size if size is not NULL --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 8ceb3f32b8..29404c3c26 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1215,6 +1215,8 @@ PyUnicode_AsWideCharString(PyUnicodeObject *unicode, return NULL; } unicode_aswidechar(unicode, buffer, buflen); + if (size) + *size = buflen; return buffer; }