aboutsummaryrefslogtreecommitdiff
path: root/src/common/compress_zstd.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-02-06 10:34:41 -0500
committerNick Mathewson <nickm@torproject.org>2018-02-06 11:05:07 -0500
commit358b609e9dfd503cc25985d197a92610cbbe9f3d (patch)
treef057b4566edfea7cbae68cd75312058045aa4176 /src/common/compress_zstd.h
parentb5a8fd1566e137f27c49d132755d2ad9e5c74f4e (diff)
downloadtor-358b609e9dfd503cc25985d197a92610cbbe9f3d.tar.gz
tor-358b609e9dfd503cc25985d197a92610cbbe9f3d.zip
Enable (safe) use of zstd static-only APIs
We'll only use these when the compile-time version and the run-time version of the zstd library match. Part of ticket 25162.
Diffstat (limited to 'src/common/compress_zstd.h')
-rw-r--r--src/common/compress_zstd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/compress_zstd.h b/src/common/compress_zstd.h
index 9bca24ded7..8882617c9f 100644
--- a/src/common/compress_zstd.h
+++ b/src/common/compress_zstd.h
@@ -17,6 +17,8 @@ const char *tor_zstd_get_version_str(void);
const char *tor_zstd_get_header_version_str(void);
+int tor_zstd_can_use_static_apis(void);
+
/** Internal state for an incremental Zstandard compression/decompression. */
typedef struct tor_zstd_compress_state_t tor_zstd_compress_state_t;
@@ -42,5 +44,9 @@ size_t tor_zstd_get_total_allocation(void);
void tor_zstd_init(void);
+#ifdef TOR_UNIT_TESTS
+void tor_zstd_set_static_apis_disabled_for_testing(int disabled);
+#endif
+
#endif /* !defined(TOR_COMPRESS_ZSTD_H) */