Skip to content

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

@WardBrian WardBrian added the c-api label Apr 3, 2023
@WardBrian WardBrian requested a review from roualdes April 3, 2023 14:48
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.

3 participants