Unify asserts in jerry-ext (#4488)

Some components of the jerry-ext library re-declared their own
assert and/or static assert macros. No need to re-invent the wheel
all the time. This patch makes all components use the assert macros
defined in jext-common.h. This also makes maintenance easier.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2021-01-17 15:21:46 +01:00
committed by GitHub
parent 11894a6032
commit 9bc0f2fd3f
5 changed files with 8 additions and 29 deletions
@@ -31,12 +31,6 @@ extern "C"
#define JERRYX_SCOPE_PRELIST_SIZE 20
#endif
#define STATIC_ASSERT(COND,MSG) typedef char static_assertion_##MSG[(COND)?1:-1]
STATIC_ASSERT (JERRYX_SCOPE_PRELIST_SIZE < 32, JERRYX_SCOPE_PRELIST_SIZE_must_be_less_than_size_of_uint8_t);
#undef STATIC_ASSERT
typedef struct jerryx_handle_t jerryx_handle_t;
/**
* Dynamically allocated handle in the scopes.