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 <rep...@bugs.python.org> <http://bugs.python.org/issue21071> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com