Skip to content
Permalink
Browse files

Set OPTS_UNWORD on arguments

This avoid GC to run on its frame
  • Loading branch information...
zsx committed Jul 27, 2015
1 parent 3fa82bb commit 9194837e490e9dc9b61729a2cb42e7d3f765f955
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/core/t-routine.c
@@ -768,7 +768,7 @@ static void ffi_to_rebol(REBRIN *rin,
Trap_Arg(reb_type);
}
v = Alloc_Tail_Blk(VAL_ROUTINE_ALL_ARGS(rot));
Init_Word_Unbound(v, REB_WORD, SYM_ELLIPSIS); //FIXME, be clear
Init_Unword(v, REB_WORD, SYM_ELLIPSIS, 0); //FIXME, be clear
EXPAND_SERIES_TAIL(VAL_ROUTINE_FFI_ARG_TYPES(rot), 1);
process_type_block(rot, reb_type, j);
i ++;
@@ -1117,16 +1117,15 @@ static void callback_dispatcher(ffi_cif *cif, void *ret, void **args, void *user
VAL_ROUTINE_FIXED_ARGS(out) = Copy_Series(VAL_ROUTINE_ARGS(out));
Remove_Series(VAL_ROUTINE_ARGS(out), 1, SERIES_TAIL(VAL_ROUTINE_ARGS(out)));
v = Alloc_Tail_Blk(VAL_ROUTINE_ARGS(out));
Init_Word_Unbound(v, REB_WORD, SYM_VARARGS);
TYPE_SET(v, REB_BLOCK);
Init_Unword(v, REB_WORD, SYM_VARARGS, TYPESET(REB_BLOCK));
} else {
REBVAL *v = NULL;
if (ROUTINE_GET_FLAG(VAL_ROUTINE_INFO(out), ROUTINE_VARARGS)) {
//... has to be the last argument
Trap_Arg_DEAD_END(blk);
}
v = Alloc_Tail_Blk(VAL_ROUTINE_ARGS(out));
Init_Word_Unbound(v, REB_WORD, VAL_WORD_SYM(blk));
Init_Unword(v, REB_WORD, VAL_WORD_SYM(blk), 0);
EXPAND_SERIES_TAIL(VAL_ROUTINE_FFI_ARG_TYPES(out), 1);

++ blk;

0 comments on commit 9194837

Please sign in to comment.
You can’t perform that action at this time.