[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Martin Panter added the comment: Thanks for looking at this David. I am posting utf8-null.v5.patch, which tweaks some of the wording. -- Added file: http://bugs.python.org/file39357/utf8-null.v5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
R. David Murray added the comment: Oh, I just realized I committed this without checking how it rendered... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
R. David Murray added the comment: OK, I didn't see anything obvious at least :) Thanks, Martin. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Roundup Robot added the comment: New changeset 99d2f83290c0 by R David Murray in branch '3.4': #23088: Clarify null termination of bytes and strings in C API. https://hg.python.org/cpython/rev/99d2f83290c0 New changeset 863f7c57081b by R David Murray in branch 'default': Merge: #23088: Clarify null termination of bytes and strings in C API. https://hg.python.org/cpython/rev/863f7c57081b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
R. David Murray added the comment: Added some review comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Martin Panter added the comment: utf8-null.v4.patch: * Clarified some mentions of “string” and “character” as bytes or code points * Copied the warning about embedded nulls to PyUnicode_AS_UNICODE() -- Added file: http://bugs.python.org/file38750/utf8-null.v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Serhiy Storchaka added the comment: The patch LGTM, but someone other should look on it. David, could you please make a look? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Changes by Martin Panter vadmium...@gmail.com: Added file: http://bugs.python.org/file38448/utf8-null.v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Martin Panter added the comment: Posting a new patch updating the documentation for some of the extra functions Serhiy mentioned. Also changed references of “NUL”, “nul” and “0” characters to “null”. I’m not very familiar with Python’s C API, so I am mainly relying on what you guys say without much of my own verification. But if there are other related doc fixes you can think of, I’m happy to include them. The PyUnicode_AsWideCharString() function already seems to document null termination well enough, so I did not change it. Let me know if you had a specific change in mind. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Martin Panter added the comment: Posting a new patch that says that the NUL is always appended for both Unicode and Bytes, and explicitly says that internal NULs are allowed. -- Added file: http://bugs.python.org/file38420/utf8-null.v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Serhiy Storchaka added the comment: There are other functions that returns null terminated data: PyByteArray_AsString(), PyBytes_AsStringAndSize(), PyUnicode_AS_UNICODE(), PyUnicode_AsUCS4Copy() PyUnicode_AsUnicode(), PyUnicode_AsUnicodeAndSize(), PyUnicode_AsWideCharString() and may be more. See also examples of notes about embedded null characters. And for consistency with all other documentation this should be written as null byte/character, not NUL. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Serhiy Storchaka added the comment: Yes, and for agreement with Victor. ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
STINNER Victor added the comment: Serhiy Storchaka added the comment: And for consistency with all other documentation this should be written as null byte/character, not NUL. Agreed! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Serhiy Storchaka added the comment: May be mention that the result of PyUnicode_AsUTF8() can contain null bytes? And the same for PyBytes_AS_STRING()/PyBytes_AsString()? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Antoine Pitrou added the comment: This looks good to me. -- nosy: +pitrou stage: - commit review type: - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
New submission from Martin Panter: As discussed in msg232863, and later confirmed in the code -- assignee: docs@python components: Documentation files: utf8-null.patch keywords: patch messages: 232925 nosy: docs@python, vadmium priority: normal severity: normal status: open title: Document that PyUnicode_AsUTF8() returns a null-terminated string versions: Python 3.4 Added file: http://bugs.python.org/file37502/utf8-null.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com