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:
Zidong Jiang
2017-06-21 19:32:13 -05:00
committed by GitHub
parent e4eecc2019
commit b153475093
6 changed files with 471 additions and 62 deletions
+9
View File
@@ -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.
*