diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-01-11 15:15:57 +0100 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-01-11 15:15:57 +0100 |
| commit | 5fd5036ea39b4e5ea4b828d0804cf1a039df9a1a (patch) | |
| tree | 20216323d9cc6321922e662b737b46fbfcf3ebdd | |
| parent | 54fd59fb75fe72de2293cd60a9894446a937eb9b (diff) | |
add `MONERO_DEBUG_isPointerNull`
| -rw-r--r-- | libbridge/src/main/cpp/wallet2_api_c.cpp | 5 | ||||
| -rw-r--r-- | libbridge/src/main/cpp/wallet2_api_c.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp index 95931fc..82024c5 100644 --- a/libbridge/src/main/cpp/wallet2_api_c.cpp +++ b/libbridge/src/main/cpp/wallet2_api_c.cpp @@ -1597,6 +1597,11 @@ const char* MONERO_DEBUG_test5_std() { return text2; } +bool MONERO_DEBUG_isPointerNull(void* wallet_ptr) { + Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr); + return (wallet != NULL); +} + #ifdef __cplusplus } #endif diff --git a/libbridge/src/main/cpp/wallet2_api_c.h b/libbridge/src/main/cpp/wallet2_api_c.h index 0f993c3..d838608 100644 --- a/libbridge/src/main/cpp/wallet2_api_c.h +++ b/libbridge/src/main/cpp/wallet2_api_c.h @@ -966,6 +966,7 @@ uint64_t MONERO_DEBUG_test3(uint64_t x); void* MONERO_DEBUG_test4(uint64_t x); const char* MONERO_DEBUG_test5(); const char* MONERO_DEBUG_test5_std(); +bool MONERO_DEBUG_isPointerNull(void* wallet_ptr); #ifdef __cplusplus } |
