-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
gh-105813: Autoconf: add and use PY_DEFINE
macro
#128525
base: main
Are you sure you want to change the base?
Conversation
erlend-aasland
commented
Jan 5, 2025
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: Namespace Autoconf preprocessor defines #105813
Finally got around to look at this again. I think this may be a good start, @encukou. Re. capi-workgroup/problems#46. I excluded defines like |
PY_DEFINE
macroPY_DEFINE
macro
That does look like a great start! Not familiar enough with Autotools to comment on the implementation. I don't think limiting this to One thing I'm worried about is keeping the two sets of names in sync. I'm not sure if/how a redistributor can set something like |
@@ -53,6 +53,16 @@ AC_DEFUN([WITH_SAVE_ENV], | |||
[RESTORE_ENV] | |||
)dnl | |||
|
|||
dnl AC_DEFINE*() wrappers. | |||
AC_DEFUN([PY_DEFINE], [dnl | |||
AC_DEFINE([[Py_]$1], [$2], [$3])dnl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, do you want to allow defining private macros (namely _Py
) or not?
dnl AC_DEFINE*() wrappers. | ||
AC_DEFUN([PY_DEFINE], [dnl | ||
AC_DEFINE([[Py_]$1], [$2], [$3])dnl | ||
AC_DEFINE([$1], [$2], [$3])dnl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you change the Py
macro for whatever reason, the non-prefixed Py_
macro would not be changed. Instead, it should be aliased to [Py_]#1
directly.