18 Dec
2014
18 Dec
'14
8:13 a.m.
STINNER Victor added the comment:
Is it safe to assume PyUnicode_AsUTF8() is null-terminated?
Yes, Python ensures that the string is null terminated.
(like PyBytes_AS_STRING() is)
Yes, PyBytes_AS_STRING() also ends with a null byte.
By the way, Unicode strings internally ends with a null character.
----------
_______________________________________
Python tracker