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

Make the REFPROP wrapper code 1% more sane #332

Closed
ibell opened this issue Dec 10, 2014 · 3 comments · Fixed by #335
Closed

Make the REFPROP wrapper code 1% more sane #332

ibell opened this issue Dec 10, 2014 · 3 comments · Fixed by #335
Milestone

Comments

@ibell
Copy link
Contributor

ibell commented Dec 10, 2014

@jowr, I just realized that the getFunctionPointer() function works with const char *. What that means is that we can re-write this function to first try the "normal" function name, then the gfortran one, then the other, since they are always the same letters, just either normal case, all lowercase or all lowercase+_ .

The good part is this means only one set of macros to support, and might mean that we can remove 50% of the REFPROP header if I am not mistaken. I had to add 4 functions to REFPROP when working on derivatives, and it is quite a pain. There are 8 places you need to add code for each one - a real maintenance nightmare.

@jowr
Copy link
Member

jowr commented Dec 10, 2014

👍 for a simplification of that code! I am not sure I understand all the implications of the const char * business, but I'll have a look as soon as time allows (after Christmas!)...

@ibell
Copy link
Contributor Author

ibell commented Dec 10, 2014

No problem, I've got it. Actually I think we can remove almost all the repetition. We might even be able to use Xmacros to reduce it even further. I think in buildbot I can get it to fire from another branch by giving the branch name in the force builder, right?

@jowr
Copy link
Member

jowr commented Dec 10, 2014

Great, yes, I hope the branch thingy works...

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

Successfully merging a pull request may close this issue.

2 participants