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

Expose version numbers in C API #101

Merged
merged 2 commits into from
Apr 4, 2023
Merged

Conversation

WardBrian
Copy link
Collaborator

Mentioned by @aseyboldt in #95. This adds three declarations to bridgestan.h:

extern int bs_major_version;
extern int bs_minor_version;
extern int bs_patch_version;

Which are populated by the version number macros we already have in version.hpp. Previously, these versions were only available by pulling apart the string returned by bs_model_info().

This also adds a warning to the Python interface if the model version and python library version differ. This should be rare, but good to check. We can do something similar in Julia in 1.9+ when it is released: pkgversion

Copy link
Owner

@roualdes roualdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks.

@WardBrian WardBrian merged commit 7dcd31b into main Apr 4, 2023
@WardBrian WardBrian deleted the feature/expose-version-C-api branch April 4, 2023 00:11
@WardBrian WardBrian mentioned this pull request Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants