From b6ec31b590a91d1f798034852d0770168f193283 Mon Sep 17 00:00:00 2001 From: devgianlu Date: Fri, 14 Feb 2025 09:45:40 +0100 Subject: [PATCH] LibCrypto: Move `OPENSSL_TRY` helper function outside namespace This allows using `OPENSSL_TRY` and `OPENSSL_TRY_PTR` outside of the `Crypto` namespace. --- Libraries/LibCrypto/OpenSSL.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/LibCrypto/OpenSSL.h b/Libraries/LibCrypto/OpenSSL.h index 4fb567c2c49..390f08c5bee 100644 --- a/Libraries/LibCrypto/OpenSSL.h +++ b/Libraries/LibCrypto/OpenSSL.h @@ -11,14 +11,14 @@ #include #include -namespace Crypto { - -static int openssl_print_errors(char const* str, size_t len, [[maybe_unused]] void* u) +inline int openssl_print_errors(char const* str, size_t len, [[maybe_unused]] void* u) { dbgln("{}", StringView { str, len }); return 1; } +namespace Crypto { + #define OPENSSL_TRY_PTR(...) \ ({ \ auto* _temporary_result = (__VA_ARGS__); \