From 11396c315e92069b57701592e4c9a8f720a5e97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Wed, 20 Apr 2022 16:08:12 -0400 Subject: [PATCH] c: add dht_version() --- c/opendht.cpp | 5 +++++ c/opendht_c.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/c/opendht.cpp b/c/opendht.cpp index e5150315..1f642688 100644 --- a/c/opendht.cpp +++ b/c/opendht.cpp @@ -32,6 +32,11 @@ extern "C" { #include <errno.h> +const char* dht_version() +{ + return dht::version(); +} + // dht::InfoHash inline dht_infohash dht_infohash_to_c(const dht::InfoHash& h) { diff --git a/c/opendht_c.h b/c/opendht_c.h index a29c2102..7569c3ba 100644 --- a/c/opendht_c.h +++ b/c/opendht_c.h @@ -36,6 +36,8 @@ struct OPENDHT_C_PUBLIC dht_data_view { }; typedef struct dht_data_view dht_data_view; +OPENDHT_C_PUBLIC const char* dht_version(); + // dht::Blob struct OPENDHT_C_PUBLIC dht_blob; typedef struct dht_blob dht_blob; -- GitLab