c import
This commit is contained in:
10
examples/issue-0019/c_wrapper.sx
Normal file
10
examples/issue-0019/c_wrapper.sx
Normal file
@@ -0,0 +1,10 @@
|
||||
// This module imports C functions and provides wrappers
|
||||
#import c {
|
||||
#include "vendors/test_c/test.h";
|
||||
#source "vendors/test_c/test.c";
|
||||
};
|
||||
|
||||
// Wrapper function that calls the C function
|
||||
wrapped_add :: (a: s32, b: s32) -> s32 {
|
||||
add_numbers(a, b);
|
||||
}
|
||||
Reference in New Issue
Block a user