Correctly compile void function arguments.

[GB.JIT]
* BUG: Correctly compile void function arguments.
This commit is contained in:
gambas 2018-08-29 11:22:56 +02:00
parent 2aad9c0625
commit 7a680d738b
2 changed files with 7 additions and 2 deletions

View file

@ -238,7 +238,7 @@ enum
#define RELEASE_FAST_o(_val) GB.Unref(&((_val).value))
#define RELEASE_FAST_v(_val) GB.ReleaseValue((GB_VALUE *)&(_val))
#define CLASS(_class) ({ JIT.load_class(_class); (GB_CLASS)(_class); })
#define CLASS(_class) ({ JIT.load_class((void *)_class); (GB_CLASS)(_class); })
#define CONSTANT_s(_addr, _len) GET_CSTRING((char *)_addr, 0, _len)
#define CONSTANT_t(_addr, _len) GET_CSTRING(GB.Translate((const char *)_addr), 0, strlen(temp.value.addr))

View file

@ -376,10 +376,15 @@ static char *borrow_expr(char *expr, TYPE type)
}
static char *get_conv_format(TYPE src, TYPE dest)
static const char *get_conv_format(TYPE src, TYPE dest)
{
static char buffer[64];
if (src == T_VOID)
{
return JIT_get_default_value(TYPEID(dest));
}
switch(dest)
{
case T_VOID: