Commit fe55f495 authored by Benoît Minisini's avatar Benoît Minisini

Fix the default value of optional Object function arguments.

[GB.JIT]
* BUG: Fix the default value of optional Object function arguments.
parent 1181b784
......@@ -166,7 +166,7 @@ typedef
#define PARAM_OPT_s(_p) PARAM_OPT(_p, s, GET_CSTRING("", 0, 0))
#define PARAM_OPT_o(_p) PARAM_OPT(_p, o, GET_OBJECT(0, GB_T_OBJECT))
#define PARAM_OPT_v(_p) PARAM_OPT(_p, v, ({ GB_VARIANT _v; _v.type = GB_T_VARIANT; _v.value.type = GB_T_NULL; _v; }))
#define PARAM_OPT_O(_p, _type) (((_p) >= n || (sp[-n+(_p)].type == GB_T_VOID)) ? GET_OBJECT(GB_T_OBJECT, 0) : PARAM_O(_p, _type))
#define PARAM_OPT_O(_p, _type) (((_p) >= n || (sp[-n+(_p)].type == GB_T_VOID)) ? GET_OBJECT(0, GB_T_OBJECT) : PARAM_O(_p, _type))
#define OPT(_p, _n) ({ \
uchar _opt = 0; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment