Skip to content

[3.15] gh-149044: Avoid C++ warnings in PySlot_END macro (GH-158866) - #158965

Merged
vstinner merged 1 commit into
python:3.15from
miss-islington:backport-ba9d96f-3.15
Oct 9, 2026
Merged

vstinner merged 1 commit into
python:3.15from
miss-islington:backport-ba9d96f-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Initialize all fields in the macro. Otherwise, g++ -Wall -Wextra
complains that some fields are not initialized
[-Werror=missing-field-initializers]:

error: missing initializer for member ‘PySlot::sl_flags’
error: missing initializer for member ‘PySlot::’
error: missing initializer for member ‘PySlot::’
(cherry picked from commit ba9d96f)

Co-authored-by: Victor Stinner vstinner@python.org

)

Initialize all fields in the macro. Otherwise, g++ -Wall -Wextra
complains that some fields are not initialized
[-Werror=missing-field-initializers]:

  error: missing initializer for member ‘PySlot::sl_flags’
  error: missing initializer for member ‘PySlot::<anonymous>’
  error: missing initializer for member ‘PySlot::<anonymous>’
(cherry picked from commit ba9d96f)

Co-authored-by: Victor Stinner <vstinner@python.org>

@encukou encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 but this can wait for 3.15.1.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vstinner
vstinner merged commit c78b5a0 into python:3.15 Oct 9, 2026
59 of 63 checks passed
@miss-islington
miss-islington deleted the backport-ba9d96f-3.15 branch October 9, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-C-API type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants