fix(decompress): match Rust trace context ABI
Define the decompression trace projection with the exact unsigned-long-long representation used by the public trace API. The generic U64 typedef can be a different C type with the same width, which made the Rust trace view fail to compile when assigned the DCtx trace field. Test Plan: - ulimit -v 41943040; make -j1
This commit is contained in:
@@ -106,7 +106,10 @@ typedef struct {
|
|||||||
size_t dctx_size;
|
size_t dctx_size;
|
||||||
} ZSTD_rustDctxView;
|
} ZSTD_rustDctxView;
|
||||||
|
|
||||||
typedef U64 ZSTD_rustTraceCtx;
|
/* Rust exposes this as u64. Use the trace API's exact unsigned-long-long
|
||||||
|
* representation instead of U64, whose typedef may be a different C type on
|
||||||
|
* some targets even when it has the same width. */
|
||||||
|
typedef unsigned long long ZSTD_rustTraceCtx;
|
||||||
typedef ZSTD_rustTraceCtx (*ZSTD_rustTraceBeginFn)(const void* dctx);
|
typedef ZSTD_rustTraceCtx (*ZSTD_rustTraceBeginFn)(const void* dctx);
|
||||||
typedef void (*ZSTD_rustTraceEndFn)(ZSTD_rustTraceCtx traceCtx,
|
typedef void (*ZSTD_rustTraceEndFn)(ZSTD_rustTraceCtx traceCtx,
|
||||||
const void* trace);
|
const void* trace);
|
||||||
|
|||||||
Reference in New Issue
Block a user