diff options
author | Ayke van Laethem <[email protected]> | 2018-11-30 13:01:20 +0100 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2018-12-10 15:38:03 +0100 |
commit | 6cacafb8dc0351c2204cefedcd83864df6591d3d (patch) | |
tree | 239dce4133fd45d9564f37992ccbe9e9c25cf757 /testdata/cgo | |
parent | c6069476a7d7f16bbd000004bf574a46d5d2222f (diff) | |
download | tinygo-6cacafb8dc0351c2204cefedcd83864df6591d3d.tar.gz tinygo-6cacafb8dc0351c2204cefedcd83864df6591d3d.zip |
cgo: add package directory to header include paths
Diffstat (limited to 'testdata/cgo')
-rw-r--r-- | testdata/cgo/main.c | 2 | ||||
-rw-r--r-- | testdata/cgo/main.go | 3 | ||||
-rw-r--r-- | testdata/cgo/main.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/testdata/cgo/main.c b/testdata/cgo/main.c index ecee93178..b0d4ba562 100644 --- a/testdata/cgo/main.c +++ b/testdata/cgo/main.c @@ -1,3 +1,5 @@ +#include "main.h" + int fortytwo() { return 42; } diff --git a/testdata/cgo/main.go b/testdata/cgo/main.go index f4a5d4d8b..b8903a7dd 100644 --- a/testdata/cgo/main.go +++ b/testdata/cgo/main.go @@ -2,8 +2,7 @@ package main /* int fortytwo(void); -typedef short myint; -int add(int a, int b); +#include "main.h" */ import "C" diff --git a/testdata/cgo/main.h b/testdata/cgo/main.h new file mode 100644 index 000000000..f41711f40 --- /dev/null +++ b/testdata/cgo/main.h @@ -0,0 +1,2 @@ +typedef short myint; +int add(int a, int b); |