diff options
Diffstat (limited to 'external/semver/src/quickcheck/semantic_version_ffi.h')
-rw-r--r-- | external/semver/src/quickcheck/semantic_version_ffi.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/external/semver/src/quickcheck/semantic_version_ffi.h b/external/semver/src/quickcheck/semantic_version_ffi.h new file mode 100644 index 0000000..5a734af --- /dev/null +++ b/external/semver/src/quickcheck/semantic_version_ffi.h @@ -0,0 +1,27 @@ +#pragma once + +// FFI for semantic version + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct Semver +{ + unsigned int major; + unsigned int minor; + unsigned int patch; + char prerelease[32]; + char build[32]; +} semver_t; + +int satisfies(const semver_t* a, const semver_t* b); +int lessThan(const semver_t* a, const semver_t* b); +void nextMajor(const semver_t* a, semver_t* b); +void nextMinor(const semver_t* a, semver_t* b); +void nextPatch(const semver_t* a, semver_t* b); + +#ifdef __cplusplus +} +#endif |