Skip to content

Fix array-lengh reference to "non-negative" from "positive" #32097

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 1 commit into from
Mar 28, 2022

Conversation

Jongy
Copy link
Contributor

@Jongy Jongy commented Mar 24, 2022

I was looking in the docs for how to create zero-length arrays, and found this reference which was misleading because you can create zero-length arrays (which serve only for taking their offsets in that case) with e.g (c_char * 0). Only c_char * -1 fails (as with any other negative).

I suppose this is a small change so I didn't create a bpo, lmk if you think it's needed...

@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label Mar 24, 2022
@JelleZijlstra JelleZijlstra merged commit 76f14b0 into python:main Mar 28, 2022
@miss-islington
Copy link
Contributor

Thanks @Jongy for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 28, 2022
…ive" (pythonGH-32097)

(cherry picked from commit 76f14b0)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
@bedevere-bot
Copy link

GH-32142 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Mar 28, 2022
@bedevere-bot
Copy link

GH-32143 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Mar 28, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 28, 2022
…ive" (pythonGH-32097)

(cherry picked from commit 76f14b0)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
@JelleZijlstra
Copy link
Member

Thanks for your contribution!

@Jongy Jongy deleted the ctypes-docs-arrays-fix branch March 28, 2022 03:41
@Jongy
Copy link
Contributor Author

Jongy commented Mar 28, 2022

Thanks for the review @JelleZijlstra

JelleZijlstra added a commit that referenced this pull request Mar 29, 2022
…ive" (GH-32097) (GH-32143)

(cherry picked from commit 76f14b0)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
JelleZijlstra added a commit that referenced this pull request Mar 29, 2022
…ive" (GH-32097) (GH-32142)

(cherry picked from commit 76f14b0)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…ive" (pythonGH-32097) (pythonGH-32143)

(cherry picked from commit 76f14b0)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants