Skip to content

gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h - #101909

Closed
zooba wants to merge 2 commits into
python:mainfrom
zooba:gh-101907
Closed

gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h#101909
zooba wants to merge 2 commits into
python:mainfrom
zooba:gh-101907

Conversation

@zooba

@zoobazooba commented Feb 14, 2023

Copy link
Copy Markdown
Member

Updates all references to use the macros, so that changes are localised to the header file.

@zooba

Copy link
Copy Markdown
MemberAuthor

Another possible fix (that I haven't tested yet) would be to move this struct into a private header. I don't have any strong preference, but I'm also not familiar with its background and intended use.

@markshannon

markshannon commented Feb 14, 2023

Copy link
Copy Markdown
Member

This is C11, not C++.

What problem is this causing? Looks like I should have read the issue.

@markshannon

Copy link
Copy Markdown
Member

Anonymous unions are quite useful, especially for inserting unions into a struct and retaining API compatibility. It's a shame we can't use them.

@zooba

Copy link
Copy Markdown
MemberAuthor

I agree they're useful, but I don't need to be convinced. We have to win over the C++ committee 😄 And then wait a decade for it to be generally available in all the compilers we support.

Incidentally, I noticed the SET macro, so I fixed it and am switching the assignments to use that.

@zooba

Copy link
Copy Markdown
MemberAuthor

#101912 is an alternate PR to this one

@zooba

Copy link
Copy Markdown
MemberAuthor

We prefer #101912

@zoobazooba closed this Feb 15, 2023
@zooba
zooba deleted the gh-101907 branch February 15, 2023 21:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@zooba@markshannon@bedevere-bot