]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
making cctxParams a pointer
authorBimba Shrestha <bimbashrestha@fb.com>
Fri, 12 Jun 2020 05:42:11 +0000 (22:42 -0700)
committerW. Felix Handte <w@felixhandte.com>
Thu, 10 Sep 2020 22:51:52 +0000 (18:51 -0400)
lib/compress/zstd_compress.c
lib/zstd.h

index 4ad60400f2ac895e90a3bce22c0e8182f05fac61..6f1df86aa0ccdfcb9dfb3c669400a0333b60edc6 100644 (file)
@@ -3481,18 +3481,18 @@ ZSTD_CDict* ZSTD_createCDict_advanced(const void* dictBuffer, size_t dictSize,
 ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict_advanced2(const void* dict, size_t dictSize,
                                                   ZSTD_dictLoadMethod_e dictLoadMethod,
                                                   ZSTD_dictContentType_e dictContentType,
-                                                  ZSTD_CCtx_params cctxParams,
+                                                  ZSTD_CCtx_params* cctxParams,
                                                   ZSTD_customMem customMem)
 {
-    int const enableDedicatedDictSearch = cctxParams.enableDedicatedDictSearch &&
-        ZSTD_dedicatedDictSearch_isSupported(cctxParams.compressionLevel, dictSize);
+    int const enableDedicatedDictSearch = cctxParams->enableDedicatedDictSearch &&
+        ZSTD_dedicatedDictSearch_isSupported(cctxParams->compressionLevel, dictSize);
     if (!enableDedicatedDictSearch)
         return ZSTD_createCDict_advanced(dict, dictSize,
-            dictLoadMethod, dictContentType, cctxParams.cParams,
+            dictLoadMethod, dictContentType, cctxParams->cParams,
             customMem);
     {
         ZSTD_compressionParameters const cParams = ZSTD_dedicatedDictSearch_getCParams(
-            cctxParams.compressionLevel, dictSize);
+            cctxParams->compressionLevel, dictSize);
         ZSTD_CDict* const cdict = ZSTD_createCDict_advanced(dict, dictSize,
             dictLoadMethod, dictContentType, cParams, customMem);
         cdict->matchState.enableDedicatedDictSearch = enableDedicatedDictSearch;
index fe5a865d513847e7ba0e7b2396464d1c05584627..c876f970685eef58a68e1ebb11e22d5a916411da 100644 (file)
@@ -1420,7 +1420,7 @@ ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict_advanced(const void* dict, size_t dictS
 ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict_advanced2(const void* dict, size_t dictSize,
                                                   ZSTD_dictLoadMethod_e dictLoadMethod,
                                                   ZSTD_dictContentType_e dictContentType,
-                                                  ZSTD_CCtx_params cctxParams,
+                                                  ZSTD_CCtx_params* cctxParams,
                                                   ZSTD_customMem customMem);
 
 ZSTDLIB_API ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize,