summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 8ceb3f3..29404c3 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;
}