-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine. I'll tag @encukou as the current ctypes expert, but be aware he's currently on leave.
I'd write it like this, to also mention what happens if size is too large:
|
# Conflicts: # Doc/library/ctypes.rst
@encukou I have applied your suggested format. |
@encukou Friendly ping :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I left my comments in the “pending” state. Sorry for the delay!
Looks great now. Thank you! |
Thanks @StanFromIreland for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…pythonGH-132858) This adds a warning about the possibly-missing NUL terminator, but in a way that doesn't make it sound like a bug/wart. (cherry picked from commit b783e17) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…pythonGH-132858) This adds a warning about the possibly-missing NUL terminator, but in a way that doesn't make it sound like a bug/wart. (cherry picked from commit b783e17) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
GH-134881 is a backport of this pull request to the 3.14 branch. |
GH-134882 is a backport of this pull request to the 3.13 branch. |
There was little support for raising errors so a docs note is probably the best thing to do -- atleast for now
📚 Documentation preview 📚: https://cpython-previews--132858.org.readthedocs.build/