diff options
author | Jack Lloyd <[email protected]> | 2018-09-02 06:16:27 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-09-02 06:16:27 -0400 |
commit | e655ba44bca275a2fe8752e45bb9a71734d1d850 (patch) | |
tree | bc99842b3fc4d2cdb4d9d0d27f19fa534aa66e79 /src | |
parent | 2d56d367988e57f0a27d4fd71aacbee56a5fe7b7 (diff) |
Use a literal date for this API version
It avoids having to rewrite existing logic when a new API version
is introduced.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ffi/ffi.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index 7bea1a209..162d96438 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -139,12 +139,10 @@ uint32_t botan_ffi_api_version() int botan_ffi_supports_api(uint32_t api_version) { - // Current API version - if(api_version == BOTAN_HAS_FFI) + // This is the API introduced in 2.8 + if(api_version == 20180713) return BOTAN_FFI_SUCCESS; - // Older versions that are still supported - // This is the API introduced in 2.3 if(api_version == 20170815) return BOTAN_FFI_SUCCESS; @@ -153,10 +151,11 @@ int botan_ffi_supports_api(uint32_t api_version) if(api_version == 20170327) return BOTAN_FFI_SUCCESS; - // This is the 2.0 API + // This is the API introduced in 2.0 if(api_version == 20150515) return BOTAN_FFI_SUCCESS; + // Something else: return -1; } |