8000 gh-107954, PEP 741: Add PyConfig_Get() function by vstinner · Pull Request #123472 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-107954, PEP 741: Add PyConfig_Get() function #123472

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 18 commits into from
Sep 2, 2024
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
Fix sys_set_flag() assertion
  • Loading branch information
vstinner committed Sep 2, 2024
commit b655e938a66813f3e88c789e04b20ffc1dc0b9b2
4 changes: 2 additions & 2 deletions Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3121,13 +3121,13 @@ static PyStructSequence_Desc flags_desc = {
"sys.flags", /* name */
flags__doc__, /* doc */
flags_fields, /* fields */
19
18
};

static void
sys_set_flag(PyObject *flags, Py_ssize_t pos, PyObject *value)
{
assert(pos >= 0 && pos < flags_desc.n_in_sequence);
assert(pos >= 0 && pos < (Py_ssize_t)(Py_ARRAY_LENGTH(flags_fields) - 1));

PyObject *old_value = PyStructSequence_GET_ITEM(flags, pos);
PyStructSequence_SET_ITEM(flags, pos, Py_NewRef(value));
Expand Down
Loading
0