diff options
Diffstat (limited to 'tests/core/cgo/adder.go')
-rw-r--r-- | tests/core/cgo/adder.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/core/cgo/adder.go b/tests/core/cgo/adder.go new file mode 100644 index 00000000..e8e2f403 --- /dev/null +++ b/tests/core/cgo/adder.go @@ -0,0 +1,14 @@ +package objc + +/* +#include "add.h" +*/ +import "C" + +func AddC(a, b int32) int32 { + return int32(C.add_c(C.int(a), C.int(b))) +} + +func AddCPP(a, b int32) int32 { + return int32(C.add_cpp(C.int(a), C.int(b))) +} |