diff --git a/lib/compress/zstdmt_compress.c b/lib/compress/zstdmt_compress.c index 1c3520364..1c6f696f6 100644 --- a/lib/compress/zstdmt_compress.c +++ b/lib/compress/zstdmt_compress.c @@ -2712,8 +2712,10 @@ static int ZSTDMT_tryAddCompressionJob(void* opaque, unsigned jobID) return POOL_tryAdd(mtctx->factory, ZSTDMT_compressionJob, &mtctx->jobs[jobID]); } -static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* mtctx, size_t srcSize, ZSTD_EndDirective endOp) +static size_t ZSTDMT_createCompressionJob(void* opaque, size_t srcSize, unsigned end) { + ZSTDMT_CCtx* const mtctx = (ZSTDMT_CCtx*)opaque; + ZSTD_EndDirective const endOp = (ZSTD_EndDirective)end; ZSTDMT_RustCreateJobProjection const projection = { mtctx->doneJobID, mtctx->nextJobID, @@ -2757,13 +2759,6 @@ static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* mtctx, size_t srcSize, ZS return result.returnCode; } -static size_t ZSTDMT_streamCreateJob(void* opaque, size_t srcSize, unsigned end) -{ - return ZSTDMT_createCompressionJob((ZSTDMT_CCtx*)opaque, srcSize, - (ZSTD_EndDirective)end); -} - - /* The Rust flush state machine receives only this synchronized scalar view. * The descriptor, condition variable, serial checksum state, and buffer pool * remain private to C. */ @@ -3097,7 +3092,7 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx, ZSTDMT_rust_compressStreamGeneric( &context, &inputProjection, &outputProjection, (unsigned)endOp, mtctx, ZSTDMT_streamTryGetInputRange, ZSTDMT_streamLoadInput, - ZSTDMT_streamCreateJob, ZSTDMT_streamFlushProduced); + ZSTDMT_createCompressionJob, ZSTDMT_streamFlushProduced); DEBUGLOG(5, "ZSTDMT_compressStream_generic (endOp=%u, srcSize=%u)", (U32)endOp, (U32)(input->size - input->pos));