]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added prototype ZSTD_versionString()
authorYann Collet <cyan@fb.com>
Tue, 16 May 2017 23:12:23 +0000 (16:12 -0700)
committerYann Collet <cyan@fb.com>
Tue, 16 May 2017 23:12:23 +0000 (16:12 -0700)
lib/common/zstd_common.c
lib/zstd.h

index 8408a589ae8d92ad26e983c138080ca98160160d..5e207e7d14a43461d5bb55a7c3729dd299f9e7c5 100644 (file)
@@ -15,7 +15,7 @@
 #include <stdlib.h>         /* 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
index b2e9a67b680bd2a54d48b32163d8d3abbf961b62..d96a535f347ca6611007607db45b9075e02c45e6 100644 (file)
@@ -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);
 
 
 /***************************************