Skip to content
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

Api changes in 1.4 #2

Closed
aaren opened this issue Apr 29, 2015 · 4 comments
Closed

Api changes in 1.4 #2

aaren opened this issue Apr 29, 2015 · 4 comments

Comments

@aaren
Copy link

aaren commented Apr 29, 2015

9f94898 has changed the api. (Now released with version 1.4)

The arguments of harminv_get_omega and harminv_get_amplitude have changed to require a harminv_complex as first argument.

Was this change necessary? Do you expect it to be permanent?

I can update my python interface (aaren/pharminv) to match the change without much problem, but I'm not sure whether you intended this change or not.

(harminv 1.3.1 is distributed with Debian Jessie)

@stevengj
Copy link
Collaborator

Yes, the API change is documented in the NEWS and is expected to be permanent. It was necessary in order to make the C99 and C++ ABIs (binary interfaces) compatible on non-x86 platforms (i.e. so that both C++ and C99 code can link to the same library).

@stevengj
Copy link
Collaborator

See the discussion in NanoComp/meep#13

@stevengj
Copy link
Collaborator

You can maintain source compatibility with older harminv versions in your code via:

#if HARMINV_VERSION_MAJOR < 1 || (HARMINV_VERSION_MAJOR == 1 && HARMINV_VERSION_MINOR < 4)
#  define harminv_get_amplitude(pa, d, k) *(pa) = harminv_get_amplitude(d, k)
#  define harminv_get_omega(pw, d, k) *(pw) = harminv_get_omega(d, k)
#endif

as in NanoComp/meep@367115c

@aaren
Copy link
Author

aaren commented Apr 30, 2015

Thanks for the explanation. I've fixed it in aaren/pharminv@be410c2.

I've released pharminv 0.3 with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants