Skip to content

Commit

Permalink
refExternalMatchFinder -> registerExternalMatchFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
embg committed Dec 19, 2022
1 parent e31b0db commit 6199dc6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contrib/externalMatchfinder/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) {
int simpleExternalMatchState = 0xdeadbeef;

// Here is the crucial bit of code!
ZSTD_refExternalMatchFinder(
ZSTD_registerExternalMatchFinder(
zc,
&simpleExternalMatchState,
simpleExternalMatchFinder
Expand Down
2 changes: 1 addition & 1 deletion lib/compress/zstd_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -6690,7 +6690,7 @@ ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long srcSizeH
return ZSTD_getParams_internal(compressionLevel, srcSizeHint, dictSize, ZSTD_cpm_unknown);
}

void ZSTD_refExternalMatchFinder(
void ZSTD_registerExternalMatchFinder(
ZSTD_CCtx* zc, void* mState,
ZSTD_externalMatchFinder_F* mFinder
) {
Expand Down
2 changes: 1 addition & 1 deletion lib/compress/zstd_compress_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ struct ZSTD_CCtx_params_s {

/* Indicates whether an external matchfinder has been referenced.
* Users can't set this externally.
* It is set internally in ZSTD_refExternalMatchFinder(). */
* It is set internally in ZSTD_registerExternalMatchFinder(). */
int useExternalMatchFinder;
}; /* typedef'd to ZSTD_CCtx_params within "zstd.h" */

Expand Down
2 changes: 1 addition & 1 deletion lib/zstd.h
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ typedef size_t ZSTD_externalMatchFinder_F (
);

ZSTDLIB_STATIC_API void
ZSTD_refExternalMatchFinder(
ZSTD_registerExternalMatchFinder(
ZSTD_CCtx* cctx,
void* externalMatchState,
ZSTD_externalMatchFinder_F* externalMatchFinder
Expand Down
2 changes: 1 addition & 1 deletion tests/zstreamtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ static int basicUnitTests(U32 seed, double compressibility, int bigTests)

/* Reference external matchfinder outside the test loop to
* check that the reference is preserved across compressions */
ZSTD_refExternalMatchFinder(
ZSTD_registerExternalMatchFinder(
zc,
&externalMatchState,
zstreamExternalMatchFinder
Expand Down

0 comments on commit 6199dc6

Please sign in to comment.