Skip to content

gh-157695: Rename HAVE_ACOSPI to _Py_HAVE_ACOSPI - #157858

Open
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:rename_have_acospi
Open

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:rename_have_acospi

Conversation

@vstinner

@vstinner vstinner commented Sep 20, 2026

Copy link
Copy Markdown
Member

configure.ac: Add PY_CHECK_FUNC_PRIVATE() function, similar to PY_CHECK_FUNC() but defines macro _Py_HAVE_xxx instead of HAVE_xxx.

Use PY_CHECK_FUNC_PRIVATE() for functions: acospi, asinpi, atanpi, atan2pi, cospi, sinpi and tanpi.

configure.ac: Add PY_CHECK_FUNC_PRIVATE() function, similar to
PY_CHECK_FUNC() but defines macro _Py_HAVE_xxx instead of HAVE_xxx.

Use PY_CHECK_FUNC_PRIVATE() for functions: acospi, asinpi, atanpi,
atan2pi, cospi, sinpi and tanpi.
@skirpichev

Copy link
Copy Markdown
Member

@vstinner, do you suggest to rename all macros, coming from standard configure tests like AC_CHECK_FUNCS_ONCE()?

I don't think that they pose some problems for programs, including Python.h: if people rely on configure macros - they should include own config.h after Python.h, that's all.

@vstinner

Copy link
Copy Markdown
Member Author

My proposition in issue #157695 is to no longer add macros with a name which doesn't start with Py to the Python C API. So new macros must start with Py.

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.

2 participants