8000 gh-69011: `ctypes.create_*_buffer` clarify NUL termination character inclusion by StanFromIreland · Pull Request #132858 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-69011: ctypes.create_*_buffer clarify NUL termination character inclusion #132858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 29, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Peter's suggestions
  • Loading branch information
StanFromIreland authored Apr 24, 2025
commit 4fe532476ccbe913b2ff04cafa7ab348791e61e6
4 changes: 2 additions & 2 deletions Doc/library/ctypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,7 @@ Utility functions
larger than its length so that the last element in the array is a NUL
termination character. An integer *size* can be passed which allows
specifying the size of the array if the length of the bytes should not be used;
Note that if *size* is too small the NUL termination character will be omitted.
note that if *size* is too small, the buffer will not be null terminated.

.. audit-event:: ctypes.create_string_buffer init,size ctypes.create_string_buffer

Expand All @@ -2060,7 +2060,7 @@ Utility functions
larger than the length of the string so that the last element in the array is a
NUL termination character. An integer *size* can be passed which allows
specifying the size of the array if the length of the bytes should not be used;
Note that if *size* is too small the NUL termination character will be omitted.
note that if *size* is too small, the buffer will not be null terminated.

.. audit-event:: ctypes.create_unicode_buffer init,size ctypes.create_unicode_buffer

Expand Down
Loading
0