]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Move deprecated annotation before static to allow C++ compilation for clang 3400/head
authorDaniel Kutenin <kutdanila@yandex.ru>
Fri, 23 Dec 2022 12:07:31 +0000 (12:07 +0000)
committerGitHub <noreply@github.com>
Fri, 23 Dec 2022 12:07:31 +0000 (12:07 +0000)
This fixes last 2 instances of https://github.com/facebook/zstd/issues/3250

lib/zdict.h
lib/zstd.h

index 7b37e50e8c0689a270e632696891277de6817ac7..2268f948a5d3e4c644e21f1a44de11bb2ef6ee34 100644 (file)
@@ -461,8 +461,8 @@ ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_legacy(
 #  endif
 #endif /* ZDICT_DISABLE_DEPRECATE_WARNINGS */
 
-ZDICTLIB_STATIC_API
 ZDICT_DEPRECATED("use ZDICT_finalizeDictionary() instead")
+ZDICTLIB_STATIC_API
 size_t ZDICT_addEntropyTablesFromBuffer(void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity,
                                   const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples);
 
index dd72e17ed7684bd9f6c2b3bd76905ab34a2f6828..a80017ba8f8f76fe15a1f7fd13236f4ec89c4060 100644 (file)
@@ -2510,8 +2510,8 @@ ZSTDLIB_STATIC_API size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLev
 ZSTDLIB_STATIC_API size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel);
 ZSTDLIB_STATIC_API size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); /**< note: fails if cdict==NULL */
 
-ZSTDLIB_STATIC_API
 ZSTD_DEPRECATED("This function will likely be removed in a future release. It is misleading and has very limited utility.")
+ZSTDLIB_STATIC_API
 size_t ZSTD_copyCCtx(ZSTD_CCtx* cctx, const ZSTD_CCtx* preparedCCtx, unsigned long long pledgedSrcSize); /**<  note: if pledgedSrcSize is not known, use ZSTD_CONTENTSIZE_UNKNOWN */
 
 ZSTDLIB_STATIC_API size_t ZSTD_compressContinue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);