mirror of
https://github.com/python/cpython.git
synced 2025-10-15 03:10:29 +00:00
Fix PyUnicode_AsWideCharString(): set *size if size is not NULL
This commit is contained in:
parent
15d597a245
commit
71e91a358b
1 changed files with 2 additions and 0 deletions
|
@ -1215,6 +1215,8 @@ PyUnicode_AsWideCharString(PyUnicodeObject *unicode,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
unicode_aswidechar(unicode, buffer, buflen);
|
unicode_aswidechar(unicode, buffer, buflen);
|
||||||
|
if (size)
|
||||||
|
*size = buflen;
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue