Message232863
| Author |
vstinner |
| Recipients |
benjamin.peterson, docs@python, martin.panter, r.david.murray, vstinner, zbysz |
| Date |
2014年12月18日.08:13:13 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAMpsgwYGap_NJk8uboi58jiqzHd2kgyMqHEpL-nTfqGqrJ82sA@mail.gmail.com> |
| In-reply-to |
<1418880300.53.0.182606524162.issue21071@psf.upfronthosting.co.za> |
| Content |
> 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. |
|