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/enc | |
parent | cdbe7fc739c312719dac65a745d8668c04b5801a (diff) | |
download | brotli-f964a1e8acc8431e17f179b0b3e7cacefe1a9230.zip brotli-f964a1e8acc8431e17f179b0b3e7cacefe1a9230.tar.gz brotli-f964a1e8acc8431e17f179b0b3e7cacefe1a9230.tar.bz2 |
Internal change
PiperOrigin-RevId: 623073126
Diffstat (limited to 'c/enc')
-rw-r--r-- | c/enc/encode.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/c/enc/encode.c b/c/enc/encode.c index 96c517b..491361b 100644 --- a/c/enc/encode.c +++ b/c/enc/encode.c @@ -687,23 +687,7 @@ static void BrotliEncoderCleanupParams(MemoryManager* m, BrotliCleanupSharedEncoderDictionary(m, ¶ms->dictionary); } -#ifdef BROTLI_REPORTING -/* When BROTLI_REPORTING is defined extra reporting module have to be linked. */ -void BrotliEncoderOnStart(const BrotliEncoderState* s); -void BrotliEncoderOnFinish(const BrotliEncoderState* s); -#define BROTLI_ENCODER_ON_START(s) BrotliEncoderOnStart(s); -#define BROTLI_ENCODER_ON_FINISH(s) BrotliEncoderOnFinish(s); -#else -#if !defined(BROTLI_ENCODER_ON_START) -#define BROTLI_ENCODER_ON_START(s) (void)(s); -#endif -#if !defined(BROTLI_ENCODER_ON_FINISH) -#define BROTLI_ENCODER_ON_FINISH(s) (void)(s); -#endif -#endif - static void BrotliEncoderInitState(BrotliEncoderState* s) { - BROTLI_ENCODER_ON_START(s); BrotliEncoderInitParams(&s->params); s->input_pos_ = 0; s->num_commands_ = 0; @@ -759,6 +743,16 @@ BrotliEncoderState* BrotliEncoderCreateInstance( return state; } +#ifdef BROTLI_REPORTING +/* When BROTLI_REPORTING is defined extra reporting module have to be linked. */ +void BrotliEncoderOnFinish(const BrotliEncoderState* s); +#define BROTLI_ENCODER_ON_FINISH(s) BrotliEncoderOnFinish(s); +#else +#if !defined(BROTLI_ENCODER_ON_FINISH) +#define BROTLI_ENCODER_ON_FINISH(s) (void)(s); +#endif +#endif + static void BrotliEncoderCleanupState(BrotliEncoderState* s) { MemoryManager* m = &s->memory_manager_; |