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
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include "handle-scope-internal.h"
#include "jext-common.h"
static jerryx_handle_scope_t jerryx_handle_scope_root =
{
@@ -157,7 +158,7 @@ jerryx_handle_scope_alloc (void)
else
{
jerryx_handle_scope_dynamic_t *dy_scope = malloc (sizeof (jerryx_handle_scope_dynamic_t));
JERRYX_HANDLE_SCOPE_ASSERT (dy_scope != NULL);
JERRYX_ASSERT (dy_scope != NULL);
dy_scope->child = NULL;
if (jerryx_handle_scope_pool.count != JERRYX_SCOPE_PRELIST_SIZE)