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

bpo-41617: Add _Py__has_builtin() macro #23260

Merged
merged 1 commit into from
Nov 13, 2020
Merged

bpo-41617: Add _Py__has_builtin() macro #23260

merged 1 commit into from
Nov 13, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 13, 2020

Fix building pycore_bitutils.h internal header on old clang version
without __builtin_bswap16() (ex: Xcode 4.6.3 on Mac OS X 10.7).

Add a new private _Py__has_builtin() macro to check for availability
of a preprocessor builtin function.

Co-Authored-By: Joshua Root [email protected]

https://bugs.python.org/issue41617

Fix building pycore_bitutils.h internal header on old clang version
without __builtin_bswap16() (ex: Xcode 4.6.3 on Mac OS X 10.7).

Add a new private _Py__has_builtin() macro to check for availability
of a preprocessor builtin function.

Co-Authored-By: Joshua Root <[email protected]>
Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

lgtm

@corona10
Copy link
Member

corona10 commented Nov 13, 2020

Are you going to replace all of the __has_builtinlogic into the newly added macro with the sperate PRs?

@vstinner
Copy link
Member Author

Are you going to replace all of the __has_builtinlogic into the newly added macro with the sperate PRs?

I saw that __has_builtin() is used to support the new macOS version, but I don't plan to change this code. This code is new and fragile, and prefer to let someone else modifying it, but I don't think that it's worth it ;-) The practical issue is also that I cannot test such change on the new macOS.

@vstinner vstinner merged commit b3b9808 into python:master Nov 13, 2020
@vstinner vstinner deleted the py_has_builtin branch November 13, 2020 14:38
@vstinner vstinner added the needs backport to 3.9 only security fixes label Nov 13, 2020
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker b3b98082c5431e77c64cab2c85525a804436b505 3.9

@bedevere-bot
Copy link

GH-23262 is a backport of this pull request to the 3.9 branch.

vstinner added a commit that referenced this pull request Nov 13, 2020
Fix building pycore_bitutils.h internal header on old clang version
without __builtin_bswap16() (ex: Xcode 4.6.3 on Mac OS X 10.7).

Add a new private _Py__has_builtin() macro to check for availability
of a preprocessor builtin function.

Co-Authored-By: Joshua Root <[email protected]>

Co-authored-by: Joshua Root <[email protected]>
(cherry picked from commit b3b9808)
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Fix building pycore_bitutils.h internal header on old clang version
without __builtin_bswap16() (ex: Xcode 4.6.3 on Mac OS X 10.7).

Add a new private _Py__has_builtin() macro to check for availability
of a preprocessor builtin function.

Co-Authored-By: Joshua Root <[email protected]>

Co-authored-by: Joshua Root <[email protected]>
@Heyitsquoracom Heyitsquoracom mentioned this pull request Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants