]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
removed "error_public.h" dependency from "zstd.h"
authorYann Collet <yann.collet.73@gmail.com>
Thu, 7 Jul 2016 12:17:40 +0000 (14:17 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Thu, 7 Jul 2016 12:17:40 +0000 (14:17 +0200)
lib/common/error_public.h
lib/common/zstd.h
programs/fuzzer.c

index e8cfcc9180a4fa2debc9a143bb8af6a63ad0865d..29050b3b3e4f393e7a655dfd030cce5cec8e8a93 100644 (file)
@@ -63,7 +63,11 @@ typedef enum {
   ZSTD_error_maxCode
 } ZSTD_ErrorCode;
 
-/* note : compare with size_t function results using ZSTD_getError() */
+/*! ZSTD_getErrorCode() :
+    convert a `size_t` function result into a `ZSTD_ErrorCode` enum type,
+    which can be used to compare directly with enum list published into "error_public.h" */
+ZSTD_ErrorCode ZSTD_getErrorCode(size_t functionResult);
+const char* ZSTD_getErrorString(ZSTD_ErrorCode code);
 
 
 #if defined (__cplusplus)
index 0ba4ca812b5703e4b9f3ee0f37b8f1e91640ba20..31d5960922662a6a1a943f9c6eba2b08afa737ea 100644 (file)
@@ -443,17 +443,6 @@ ZSTDLIB_API size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t dstCa
 ZSTDLIB_API size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize);  /**< insert block into `dctx` history. Useful to track uncompressed blocks */
 
 
-/*-*************************************
-*  Error management
-***************************************/
-#include "error_public.h"
-/*! ZSTD_getErrorCode() :
-    convert a `size_t` function result into a `ZSTD_ErrorCode` enum type,
-    which can be used to compare directly with enum list published into "error_public.h" */
-ZSTDLIB_API ZSTD_ErrorCode ZSTD_getErrorCode(size_t functionResult);
-ZSTDLIB_API const char* ZSTD_getErrorString(ZSTD_ErrorCode code);
-
-
 #endif   /* ZSTD_STATIC_LINKING_ONLY */
 
 #if defined (__cplusplus)
index 2126e124f8d031fcd8b0f7473fb6d2a96f4048ab..f38a48bf42240f5a264b1129c3b55731c36ccc0b 100644 (file)
@@ -41,7 +41,8 @@
 #include <string.h>      /* strcmp */
 #include <time.h>        /* clock_t */
 #define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_compressContinue, ZSTD_compressBlock */
-#include "zstd.h"        /* ZSTD_VERSION_STRING, ZSTD_getErrorCode */
+#include "zstd.h"        /* ZSTD_VERSION_STRING */
+#include "error_public.h" /* ZSTD_getErrorCode */
 #include "zdict.h"       /* ZDICT_trainFromBuffer */
 #include "datagen.h"     /* RDG_genBuffer */
 #include "mem.h"