From 7ab07bd95f99d3b69bdd2b1786dfbbd4ff667d93 Mon Sep 17 00:00:00 2001 From: gambas Date: Mon, 20 Aug 2018 19:57:47 +0200 Subject: [PATCH] Correctly handle optional object arguments. [GB.JIT] * BUG: Correctly handle optional object arguments. --- main/lib/jit/gb.jit/jit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/lib/jit/gb.jit/jit.h b/main/lib/jit/gb.jit/jit.h index d06c02bc9..680b6b428 100644 --- a/main/lib/jit/gb.jit/jit.h +++ b/main/lib/jit/gb.jit/jit.h @@ -133,7 +133,7 @@ typedef #define PARAM_OPT_p(_p) PARAM_OPT(_p, p, 0) #define PARAM_OPT_d(_p) PARAM_OPT(_p, d, ({ GB_DATE _v; _v.type = GB_T_DATE; _v.value.time = _v.value.date = 0; _v; })) #define PARAM_OPT_s(_p) PARAM_OPT(_p, s, GET_CSTRING("", 0, 0)) -#define PARAM_OPT_o(_p) PARAM_OPT(_p, o, GET_OBJECT(GB_T_OBJECT, 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))