summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh2
-rw-r--r--foreign.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index ca452e4..4c26cc7 100755
--- a/build.sh
+++ b/build.sh
@@ -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
diff --git a/foreign.c b/foreign.c
index 647a182..ef028ba 100644
--- a/foreign.c
+++ b/foreign.c
@@ -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;
}