feat(compress): move sequence validation identity to Rust
ZSTD_resolveExternalSequenceValidation() is a pure int identity used while resolving CCtx parameters. Route its existing C wrapper through a Rust extern "C" entry point in the parameter module, preserving the int-to-int ABI and every call-site result. Add boundary coverage for signed int modes. Test Plan: - `cargo test --manifest-path rust/Cargo.toml --no-default-features --features compression` -- passed (253 tests) - `make -B -C lib -j2 lib` -- passed - required clippy passes for the compression feature, benches, and tests -- passed - `cargo +nightly fmt --manifest-path rust/Cargo.toml` and `git diff --check` -- passed
This commit is contained in:
@@ -106,6 +106,7 @@ size_t ZSTD_rust_params_resolveMaxBlockSize(size_t maxBlockSize);
|
||||
size_t ZSTD_rust_params_getBlockSize(size_t maxBlockSize, U32 windowLog);
|
||||
void ZSTD_rust_params_overrideCParams(ZSTD_compressionParameters* cParams,
|
||||
const ZSTD_compressionParameters* overrides);
|
||||
int ZSTD_rust_params_resolveExternalSequenceValidation(int mode);
|
||||
int ZSTD_rust_params_rowMatchFinderSupported(int strategy);
|
||||
int ZSTD_rust_params_rowMatchFinderUsed(int strategy, int mode);
|
||||
int ZSTD_rust_params_resolveRowMatchFinderMode(
|
||||
@@ -605,7 +606,7 @@ static ZSTD_ParamSwitch_e ZSTD_resolveEnableLdm(ZSTD_ParamSwitch_e mode,
|
||||
}
|
||||
|
||||
static int ZSTD_resolveExternalSequenceValidation(int mode) {
|
||||
return mode;
|
||||
return ZSTD_rust_params_resolveExternalSequenceValidation(mode);
|
||||
}
|
||||
|
||||
/* Resolves maxBlockSize to the default if no value is present. */
|
||||
|
||||
Reference in New Issue
Block a user