From: Yann Collet Date: Tue, 16 May 2017 23:12:23 +0000 (-0700) Subject: added prototype ZSTD_versionString() X-Git-Tag: v1.3.0~1^2~36^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfff8999c5a397e799681b1c43df1c9c7f5f1782;p=thirdparty%2Fzstd.git added prototype ZSTD_versionString() --- diff --git a/lib/common/zstd_common.c b/lib/common/zstd_common.c index 8408a589a..5e207e7d1 100644 --- a/lib/common/zstd_common.c +++ b/lib/common/zstd_common.c @@ -15,7 +15,7 @@ #include /* malloc */ #include "error_private.h" #define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */ +#include "zstd.h" /*-**************************************** @@ -23,6 +23,8 @@ ******************************************/ unsigned ZSTD_versionNumber (void) { return ZSTD_VERSION_NUMBER; } +const char* ZSTD_versionString(void) { return ZSTD_VERSION_STRING; } + /*-**************************************** * ZSTD Error Management diff --git a/lib/zstd.h b/lib/zstd.h index b2e9a67b6..d96a535f3 100644 --- a/lib/zstd.h +++ b/lib/zstd.h @@ -58,13 +58,14 @@ extern "C" { #define ZSTD_VERSION_MINOR 3 #define ZSTD_VERSION_RELEASE 0 +#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) +ZSTDLIB_API unsigned ZSTD_versionNumber(void); /**< to be used when checking dll version */ + #define ZSTD_LIB_VERSION ZSTD_VERSION_MAJOR.ZSTD_VERSION_MINOR.ZSTD_VERSION_RELEASE #define ZSTD_QUOTE(str) #str #define ZSTD_EXPAND_AND_QUOTE(str) ZSTD_QUOTE(str) #define ZSTD_VERSION_STRING ZSTD_EXPAND_AND_QUOTE(ZSTD_LIB_VERSION) - -#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) -ZSTDLIB_API unsigned ZSTD_versionNumber(void); /**< library version number; to be used when checking dll version */ +ZSTDLIB_API const char* ZSTD_versionString(void); /***************************************