LibCrypto: Move OPENSSL_TRY helper function outside namespace

This allows using `OPENSSL_TRY` and `OPENSSL_TRY_PTR` outside of the
`Crypto` namespace.
This commit is contained in:
devgianlu 2025-02-14 09:45:40 +01:00 committed by Ali Mohammad Pur
parent 53dd99098c
commit b6ec31b590
Notes: github-actions[bot] 2025-02-17 18:54:01 +00:00

View file

@ -11,14 +11,14 @@
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
#include <LibCrypto/OpenSSLForward.h>
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__); \