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

Deprecate magic numbers in zeroD CLIB interface #638

Closed
ischoegl opened this issue May 14, 2019 · 1 comment · Fixed by #660
Closed

Deprecate magic numbers in zeroD CLIB interface #638

ischoegl opened this issue May 14, 2019 · 1 comment · Fixed by #660

Comments

@ischoegl
Copy link
Member

ischoegl commented May 14, 2019

Cantera version

All / current development version (2.5.0a2)

Operating System

All

Python/MATLAB version

N/A

Expected Behavior

The use of magic numbers as type constants should be deprecated throughout Cantera in favor of string types. I.e. type queries should have a signature virtual std::string type() const, like in class ThermoPhase.

Actual Behavior

All current objects in zeroD still use magic numbers with a signature int type() const. While a resolution of this issue in the cython interface is straight-forward, the current structure of the CLIB interface depends on integer-based object creation, i.e. internal integer m_type class variables are still essential.

Steps to reproduce

N/A

@ischoegl
Copy link
Member Author

This Issue is based on comments by @speth (made during discussions for PR #632). A corresponding fix is proposed in PR #660.

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

Successfully merging a pull request may close this issue.

2 participants