Updated to resolve most of Victor's concerns, but this meant enough changes that I'm not sure it quite counts as editorial only.
A few questions that I couldn't answer:
(1) Upon string creation, do we want to *promise* to discard the UTF-8 and wstr, so that the caller can memory manage?
(2) PyUnicode_AS_DATA(), Py_UNICODE_strncpy, Py_UNICODE_strncmp seemed to be there in the code I was looking at.
(3) I can't justify the born-deprecated function "PyUnicode_AsUnicodeAndSize". Perhaps rename it with a leading underscore? Though I'm not sure it is really needed at all.
(4) I tried to reword the "for compatibility" ... "redundant" part ... but I'm not sure I resolved it. |