Skip to content

gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use #118208

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 2 commits into from
Apr 25, 2024

Conversation

itamaro
Copy link
Contributor

@itamaro itamaro commented Apr 24, 2024

@encukou
Copy link
Member

encukou commented Apr 24, 2024

Did you consider renaming it to _Py_COMMON_FIELDS, so that we also avoid a clash if someone defines it before including Python.h?

@itamaro
Copy link
Contributor Author

itamaro commented Apr 24, 2024

Did you consider renaming it to _Py_COMMON_FIELDS, so that we also avoid a clash if someone defines it before including Python.h?

Good idea, happy to update the PR with that suggestion!

I'll keep the undef, unless you think it should remain defined with that name (which should be safe).

@encukou
Copy link
Member

encukou commented Apr 24, 2024

Yeah, undef is good -- with it, other Python header files can use the same name :)

@itamaro itamaro changed the title gh-118207: undef the COMMON_FIELDS macro in funcobject.h after it is used gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use Apr 24, 2024
@itamaro
Copy link
Contributor Author

itamaro commented Apr 24, 2024

done!

@encukou encukou merged commit 796b3fb into python:main Apr 25, 2024
36 checks passed
@miss-islington-app
Copy link

Thanks @itamaro for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 25, 2024
…ndef it after use (pythonGH-118208)

(cherry picked from commit 796b3fb)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Apr 25, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Apr 25, 2024
@encukou
Copy link
Member

encukou commented Apr 25, 2024

Thank you!

@itamaro itamaro deleted the undef_funcobject_common_fields branch April 25, 2024 14:05
JelleZijlstra pushed a commit that referenced this pull request Apr 26, 2024
…undef it after use (GH-118208) (#118269)

gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use (GH-118208)
(cherry picked from commit 796b3fb)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
Sign up for free to 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