-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
BUG: Use of #undef complex
in npy_common.h
breaks extension modules that use #include <complex.h>
#24344
Comments
In theory, the line |
That sounds like the right fix at first sight.
We're requiring C99 and
That seems like something we should not do indeed, arguably that's a bug in NumPy. |
Ping @lysnikolaou for awareness. |
Agreed that we should leave the |
I think post-processing the |
There is an issue about f2c maintenance on a (the?) github mirror, where it seems the way to contact the netlib maintainer is via email (see the bottom of the README). |
with that, I don't think we have to solve all of the problems. We can do what we need to do, and point users to the potential pitfalls of using |
We're not exposing |
Not sure whether that's necessary. As far as I understand, the |
- Change complex to is_complex in multiarray/buffer.c - Change all complex occurences in vendored f2c to singlecomplex - Modify patches for f2c-generated code and regenerate Closes numpy#24344.
- Change complex to is_complex in multiarray/buffer.c - Change all complex occurences in vendored f2c to singlecomplex - Modify patches for f2c-generated code and regenerate Closes numpy#24344. Signed-off-by: Filipe Laíns <lains@riseup.net>
Describe the issue:
The line
#undef complex
in the filenpy_common.h
that was added in #24085 breaks the compilation of any extension module that uses bothnpy_common.h
and the standard header<complex.h>
. (See, for example, the extension module cross_gufunc.c.src in ufunclab.)A fix would be to remove that line from
npy_common.h
, but that will break any code that the includesnpy_common.h
that also uses the namecomplex
to define a variable or struct. This is the case for several files in NumPy, including thef2c
-related files in thelapack_lite
code (see my naive attempt in #24343).Transitive includes and the global namespace in C... such fun.
Runtime information:
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: