diff --git a/lib/common/zstd_trace.h b/lib/common/zstd_trace.h index f2fa7f79..487617cf 100644 --- a/lib/common/zstd_trace.h +++ b/lib/common/zstd_trace.h @@ -11,6 +11,10 @@ #ifndef ZSTD_TRACE_H #define ZSTD_TRACE_H +#if defined (__cplusplus) +extern "C" { +#endif + #include /* weak symbol support */ @@ -141,4 +145,8 @@ void ZSTD_trace_decompress_end( #endif /* ZSTD_TRACE */ +#if defined (__cplusplus) +} +#endif + #endif /* ZSTD_TRACE_H */ diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index ac11c3dd..5b054a72 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -797,7 +797,7 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, } } -size_t ZSTD_CCtx_getParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value) +size_t ZSTD_CCtx_getParameter(ZSTD_CCtx const* cctx, ZSTD_cParameter param, int* value) { return ZSTD_CCtxParams_getParameter(&cctx->requestedParams, param, value); } diff --git a/lib/zstd.h b/lib/zstd.h index 230adee3..64265f68 100644 --- a/lib/zstd.h +++ b/lib/zstd.h @@ -1837,7 +1837,7 @@ ZSTDLIB_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const void* pre * and store it into int* value. * @return : 0, or an error code (which can be tested with ZSTD_isError()). */ -ZSTDLIB_API size_t ZSTD_CCtx_getParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value); +ZSTDLIB_API size_t ZSTD_CCtx_getParameter(const ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value); /*! ZSTD_CCtx_params :