diff options
-rwxr-xr-x | build.sh | 2 | ||||
-rw-r--r-- | foreign.c | 5 |
2 files changed, 3 insertions, 4 deletions
@@ -29,7 +29,7 @@ if [ "$COMPILE_TIME_FOREIGN_FN_SUPPORT" != "no" ]; then if uname | grep -qi bsd; then LIBRARIES='-lavcall' else - LIBRARIES='-ldl -lffcall' + LIBRARIES='-ldl -lavcall' fi ADDITIONAL_FLAGS="$ADDITIONAL_FLAGS -DCOMPILE_TIME_FOREIGN_FN_SUPPORT=1 $LIBRARIES" fi @@ -287,7 +287,6 @@ static void ffmgr_create(ForeignFnManager *ffmgr, Allocator *allocr) { str_hash_table_create(&ffmgr->libs_loaded, sizeof(Library), allocr); } -/* args must be a dynamic array. */ static bool foreign_call(ForeignFnManager *ffmgr, FnExpr *fn, Type *ret_type, Type *arg_types, size_t arg_types_stride, Value *args, size_t nargs, Location call_where, Value *ret) { void (*fn_ptr)() = fn->foreign.fn_ptr; if (!fn_ptr) { @@ -344,8 +343,8 @@ static void ffmgr_create(ForeignFnManager *ffmgr, Allocator *allocr) { (void)allocr; } -static bool foreign_call(ForeignFnManager *ffmgr, FnExpr *fn, Type *fn_type, Value *args, Location call_where, Value *ret) { - (void)ffmgr; (void)fn; (void)fn_type; (void)args; (void)ret; +static bool foreign_call(ForeignFnManager *ffmgr, FnExpr *fn, Type *ret_type, Type *arg_types, size_t arg_types_stride, Value *args, size_t nargs, Location call_where, Value *ret) { + (void)ffmgr; (void)fn; (void)ret_type; (void)arg_types; (void)arg_types_stride; (void)args; (void)nargs; (void)ret; err_print(call_where, "You have not compiled toc with compile time foreign function support."); return false; } |