diff options
author | Brotli <no-reply@google.com> | 2024-04-09 00:18:20 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-04-09 00:19:11 -0700 |
commit | f964a1e8acc8431e17f179b0b3e7cacefe1a9230 (patch) | |
tree | 9386905077f6a9c8012ccef659db4d154d4c3fa6 /c/dec/state.c | |
parent | cdbe7fc739c312719dac65a745d8668c04b5801a (diff) | |
download | brotli-f964a1e8acc8431e17f179b0b3e7cacefe1a9230.zip brotli-f964a1e8acc8431e17f179b0b3e7cacefe1a9230.tar.gz brotli-f964a1e8acc8431e17f179b0b3e7cacefe1a9230.tar.bz2 |
Internal change
PiperOrigin-RevId: 623073126
Diffstat (limited to 'c/dec/state.c')
-rw-r--r-- | c/dec/state.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/c/dec/state.c b/c/dec/state.c index edc56c9..be6a266 100644 --- a/c/dec/state.c +++ b/c/dec/state.c @@ -17,24 +17,8 @@ extern "C" { #endif -#ifdef BROTLI_REPORTING -/* When BROTLI_REPORTING is defined extra reporting module have to be linked. */ -void BrotliDecoderOnStart(const BrotliDecoderState* s); -void BrotliDecoderOnFinish(const BrotliDecoderState* s); -#define BROTLI_DECODER_ON_START(s) BrotliDecoderOnStart(s); -#define BROTLI_DECODER_ON_FINISH(s) BrotliDecoderOnFinish(s); -#else -#if !defined(BROTLI_DECODER_ON_START) -#define BROTLI_DECODER_ON_START(s) (void)(s); -#endif -#if !defined(BROTLI_DECODER_ON_FINISH) -#define BROTLI_DECODER_ON_FINISH(s) (void)(s); -#endif -#endif - BROTLI_BOOL BrotliDecoderStateInit(BrotliDecoderState* s, brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque) { - BROTLI_DECODER_ON_START(s); if (!alloc_func) { s->alloc_func = BrotliDefaultAllocFunc; s->free_func = BrotliDefaultFreeFunc; @@ -151,6 +135,16 @@ void BrotliDecoderStateCleanupAfterMetablock(BrotliDecoderState* s) { BROTLI_DECODER_FREE(s, s->distance_hgroup.htrees); } +#ifdef BROTLI_REPORTING +/* When BROTLI_REPORTING is defined extra reporting module have to be linked. */ +void BrotliDecoderOnFinish(const BrotliDecoderState* s); +#define BROTLI_DECODER_ON_FINISH(s) BrotliDecoderOnFinish(s); +#else +#if !defined(BROTLI_DECODER_ON_FINISH) +#define BROTLI_DECODER_ON_FINISH(s) (void)(s); +#endif +#endif + void BrotliDecoderStateCleanup(BrotliDecoderState* s) { BrotliDecoderStateCleanupAfterMetablock(s); |