Skip to content

Commit f744fd4

Browse files
committed
NIFs: remove VALIDATE_VALUE / RAISE_ERROR macros
Just use the ones defined in nifs.h. Signed-off-by: Davide Bettio <[email protected]>
1 parent 012ba89 commit f744fd4

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/platforms/generic_unix/lib/platform_nifs.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@
3737
//#define ENABLE_TRACE
3838
#include "trace.h"
3939

40-
#define VALIDATE_VALUE(value, verify_function) \
41-
if (UNLIKELY(!verify_function((value)))) { \
42-
argv[0] = ERROR_ATOM; \
43-
argv[1] = BADARG_ATOM; \
44-
return term_invalid_term(); \
45-
}
46-
47-
#define RAISE_ERROR(error_type_atom) \
48-
ctx->x[0] = ERROR_ATOM; \
49-
ctx->x[1] = (error_type_atom); \
50-
return term_invalid_term();
51-
5240
#if ATOMVM_HAS_MBEDTLS
5341

5442
// declared in otp_crypt

src/platforms/rp2/src/lib/platform_nifs.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@
4444
// #define ENABLE_TRACE
4545
#include "trace.h"
4646

47-
#define VALIDATE_VALUE(value, verify_function) \
48-
if (UNLIKELY(!verify_function((value)))) { \
49-
argv[0] = ERROR_ATOM; \
50-
argv[1] = BADARG_ATOM; \
51-
return term_invalid_term(); \
52-
}
53-
5447
static term nif_atomvm_platform(Context *ctx, int argc, term argv[])
5548
{
5649
UNUSED(ctx);

0 commit comments

Comments
 (0)