Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
StanFromIreland wants to merge5 commits intopython:main
base:main
Choose a base branch
Loading
fromStanFromIreland:ctypes-note
Open
Changes from1 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
NextNext commit
commit
  • Loading branch information
@StanFromIreland
StanFromIreland committedApr 23, 2025
commit57236552eae1a1b580c6bd427b092cf4ef3b276c
11 changes: 6 additions & 5 deletionsDoc/library/ctypes.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2041,8 +2041,9 @@ Utility functions

If a bytes object is specified as first argument, the buffer is made one item
larger than its length so that the last element in the array is a NUL
termination character. An integer can be passed as second argument which allows
specifying the size of the array if the length of the bytes should not be used.
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.

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

Expand All@@ -2057,9 +2058,9 @@ Utility functions

If a string is specified as first argument, the buffer is made one item
larger than the length of the string so that the last element in the array is a
NUL termination character. An integer can be passedas second argumentwhich
allowsspecifying the size of the array if the length of thestring should not
beused.
NUL termination character.An integer*size*can be passed which allows
specifying the size of the array if the length of thebytes should not be used;
Note that if *size* is too small the NUL termination character willbeomitted.

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

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp