From: Yann Collet Date: Thu, 7 Jul 2016 12:17:40 +0000 (+0200) Subject: removed "error_public.h" dependency from "zstd.h" X-Git-Tag: v0.7.3^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e72efeb0a13e919979b67acc7229f987f99cbcbd;p=thirdparty%2Fzstd.git removed "error_public.h" dependency from "zstd.h" --- diff --git a/lib/common/error_public.h b/lib/common/error_public.h index e8cfcc918..29050b3b3 100644 --- a/lib/common/error_public.h +++ b/lib/common/error_public.h @@ -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) diff --git a/lib/common/zstd.h b/lib/common/zstd.h index 0ba4ca812..31d596092 100644 --- a/lib/common/zstd.h +++ b/lib/common/zstd.h @@ -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) diff --git a/programs/fuzzer.c b/programs/fuzzer.c index 2126e124f..f38a48bf4 100644 --- a/programs/fuzzer.c +++ b/programs/fuzzer.c @@ -41,7 +41,8 @@ #include /* strcmp */ #include /* 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"