-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
[C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined #89603
Comments
If the HAVE_DECL_ISINF macro is not defined in pyconfig.h, the Py_IS_INFINITY macro is defined as: #define Py_IS_INFINITY(X) \
((X) && (Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X))) Problem: Py_FORCE_DOUBLE() is excluded from the limited C API (and the stable ABI). I see different options:
I would prefer to *remove* Py_FORCE_DOUBLE() to all APIs, than adding it to the limited C API. |
The Py_FORCE_DOUBLE() macro was added in bpo-5724 by the change: commit e05e840
|
Well, the final fix is to remove the code path when isinf() is not available and require it to build Python ;-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: