26 #define JSU_REQUIRE_PARAMS(exact_number)\
27 if(argc != exact_number)\
28 return jsu_report_param_error(cx, vp);
30 #define JSU_REQUIRE_NO_PARAMS()\
32 return jsu_report_param_error(cx, vp);
34 #define JSU_REQUIRE_PARAM_RANGE(min_number, max_number)\
35 if(!(min_number <= argc && argc <= max_number))\
36 return jsu_report_param_error(cx, vp);
38 #define JSU_REQUIRE_MAX_PARAMS(max_number)\
39 if(argc > max_number)\
40 return jsu_report_param_error(cx, vp);
42 #define JSU_REQUIRE_MIN_PARAMS(min_number)\
43 if(argc < min_number)\
44 return jsu_report_param_error(cx, vp);
49 #define JSU_REQUIRE_PARAMS_CPP(exact_number)\
50 if(argc != exact_number)\
52 jsu_report_param_error(cx, 0);\
57 #define JSU_ASSERT(expr, msg)\
61 JS_ReportError(cx, msg);\
JSBool jsu_report_param_error(JSContext *cx, jsval *vp)