add transform functions for integer in jerryx/arg (#1883)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
This commit is contained in:
@@ -17,6 +17,15 @@
|
||||
#include "jerryscript-ext/arg.h"
|
||||
#include "jerryscript.h"
|
||||
|
||||
|
||||
#define JERRYX_STATIC_ASSERT(x, msg) \
|
||||
enum { static_assertion_failed_ ## msg = 1 / (!!(x)) }
|
||||
|
||||
JERRYX_STATIC_ASSERT (sizeof (jerryx_arg_int_option_t) <= sizeof (((jerryx_arg_t *) 0)->extra_info),
|
||||
jerryx_arg_number_options_t_must_fit_into_extra_info);
|
||||
|
||||
#undef JERRYX_STATIC_ASSERT
|
||||
|
||||
/**
|
||||
* Validate the JS arguments and assign them to the native arguments.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user