-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
ENH: F90 bind(c) intrinsic derived types #20770
base: main
Are you sure you want to change the base?
Conversation
90cea12
to
57015ba
Compare
I'm thinking of splitting this up. It is already rather a lot to review. The remaining bullet points have been shifted into #21160. It would be good to have this in before finalizing the 3-part NEP on F2PY. @melissawm and @pearu if the implementation and existing tests seem good, then perhaps we can iterate on this in successive PRs? |
631829e
to
cca4a8f
Compare
I understand that without the array support this is more skeletal than it ought to be, but it might still cover enough ground to be useful. If I can't find more time to add the array support (haven't looked it over in a while) it might be useful to just merge it (after rebases of course). |
Allow to parse type definition with inline acess specifier, like: type, public :: foo end type foo
Modified after numpygh-24555
These are implemented as dictionaries, and support `c_float`, `c_int` and `c_double` (along with their extensions)
d31fbda
to
3138eba
Compare
A better / alternate implementation is now almost ready here: https://github.com/HaoZeke/f2py_derived_nep/pull/5/files One thing to note is that using the PyCapslue method for types which are beyond Needs support from the parser too. |
This PR will establish the following:
crackfortran
failuresiso_c_binding
generates correct wrappersAdditionally, for derived types:
c_float
,c_double
)These are being ported over from https://github.com/HaoZeke/f2py_skel/pull/17/files.
The F90 derived type support is in line with #14938.
The implementation is fairly modular, and modifies the global dictionary to generate
bind(c)
compatible code.A tracking issue should cover the rest of the items (strings, pointers) which are needed to fully support the standard interoperable C structures.
Requires #15844.