diff options
Diffstat (limited to 'tests/core/c_linkmodes/add_sandwich.go')
-rw-r--r-- | tests/core/c_linkmodes/add_sandwich.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/core/c_linkmodes/add_sandwich.go b/tests/core/c_linkmodes/add_sandwich.go new file mode 100644 index 00000000..0073638f --- /dev/null +++ b/tests/core/c_linkmodes/add_sandwich.go @@ -0,0 +1,14 @@ +package main + +/* +#define CGO_EXPORT_H_EXISTS +#include "tests/core/c_linkmodes/add_sandwich.h" +*/ +import "C" + +//export GoAdd +func GoAdd(a, b int) int { + return int(C.add(C.int(a), C.int(b))) +} + +func main() {} |