Skip to content
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

Doc: c-api: fix order of PyMemberDef fields #112879

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

methane
Copy link
Member

@methane methane commented Dec 8, 2023

The field order is different from its definition.

/* An array of PyMemberDef structures defines the name, type and offset
of selected members of a C structure. These can be read by
PyMember_GetOne() and set by PyMember_SetOne() (except if their READONLY
flag is set). The array must be terminated with an entry whose name
pointer is NULL. */
struct PyMemberDef {
const char *name;
int type;
Py_ssize_t offset;
int flags;
const char *doc;
};

This issue was introduced in https://github.com/python/cpython/pull/99014/files#diff-7cc88f3345d03aaf0505c8c85cf6912c43b87a16e124332e84059f1550061286


📚 Documentation preview 📚: https://cpython-previews--112879.org.readthedocs.build/

@methane methane added docs Documentation in the Doc dir skip issue skip news topic-C-API 3.12 bugs and security fixes 3.13 bugs and security fixes needs backport to 3.12 bug and security fixes labels Dec 8, 2023
@methane methane requested a review from encukou December 8, 2023 16:50
@methane methane merged commit 42a86df into python:main Dec 10, 2023
34 checks passed
@methane methane deleted the doc-pymemberdef-fix-order branch December 10, 2023 17:43
@miss-islington-app
Copy link

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 10, 2023
(cherry picked from commit 42a86df)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Dec 10, 2023

GH-112937 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Dec 10, 2023
methane pushed a commit that referenced this pull request Dec 10, 2023
Doc: c-api: fix order of PyMemberDef fields (GH-112879)
(cherry picked from commit 42a86df)
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes docs Documentation in the Doc dir skip issue skip news topic-C-API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants