diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-13 18:21:05 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-13 18:21:05 -0400 |
commit | 320a99b59ec32b8db6436982856116da1884d131 (patch) | |
tree | 14247282403eda2b687bdc35c83f47079159bceb | |
parent | 78daa3fc749f68135d1364df938c63aa9a9cbcb3 (diff) |
fixed various build problems
-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; } |