mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
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:
parent
53dd99098c
commit
b6ec31b590
Notes:
github-actions[bot]
2025-02-17 18:54:01 +00:00
Author: https://github.com/devgianlu
Commit: b6ec31b590
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3571
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 3 additions and 3 deletions
|
@ -11,14 +11,14 @@
|
||||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||||
#include <LibCrypto/OpenSSLForward.h>
|
#include <LibCrypto/OpenSSLForward.h>
|
||||||
|
|
||||||
namespace Crypto {
|
inline int openssl_print_errors(char const* str, size_t len, [[maybe_unused]] void* u)
|
||||||
|
|
||||||
static int openssl_print_errors(char const* str, size_t len, [[maybe_unused]] void* u)
|
|
||||||
{
|
{
|
||||||
dbgln("{}", StringView { str, len });
|
dbgln("{}", StringView { str, len });
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Crypto {
|
||||||
|
|
||||||
#define OPENSSL_TRY_PTR(...) \
|
#define OPENSSL_TRY_PTR(...) \
|
||||||
({ \
|
({ \
|
||||||
auto* _temporary_result = (__VA_ARGS__); \
|
auto* _temporary_result = (__VA_ARGS__); \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue