From cd90f3bcd0349759030751ec7ce84eec6ee80c43 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 1 May 2024 14:02:30 +0200 Subject: expose free function --- wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp | 6 ++++++ wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'wownero_libwallet2_api_c/src/main/cpp') diff --git a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp index e5035ef..12117e2 100644 --- a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp +++ b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp @@ -1932,6 +1932,12 @@ void* WOWNERO_deprecated_create14WordSeed(char *path, char *password, char *lang return reinterpret_cast(wallet); } +// i hate windows + +void WOWNERO_free(void* ptr) { + free(ptr); +} + #ifdef __cplusplus } #endif diff --git a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h index 48b4a02..4321f16 100644 --- a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h +++ b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h @@ -1009,6 +1009,9 @@ extern ADDAPI uint64_t WOWNERO_cw_WalletListener_height(void* cw_walletListener_ extern ADDAPI void* WOWNERO_deprecated_restore14WordSeed(char *path, char *password, char *seed, int32_t networkType); extern ADDAPI void* WOWNERO_deprecated_create14WordSeed(char *path, char *password, char *language, int32_t networkType); extern ADDAPI uint64_t WOWNERO_deprecated_14WordSeedHeight(char *seed); + +extern ADDAPI void WOWNERO_free(void* ptr); + #ifdef __cplusplus } #endif \ No newline at end of file -- cgit v1.2.3