summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2011-07-18 07:23:52 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2011-07-18 07:23:52 -0700
commit805d7399fa4b2c2f1bc674946def967cac9409d7 (patch)
treeef9bb4a7fab32f9917082d5fa642c4266d09891d /misc
parent6c1a468199d52d1bb05d214f739b75d5deb18a08 (diff)
downloadgo-805d7399fa4b2c2f1bc674946def967cac9409d7.tar.gz
cgo: add missing semicolon in generated struct
This affected certain signatures needing padding like: //export Foo func Foo() (int, C.long) { ... } R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/4745047
Diffstat (limited to 'misc')
-rw-r--r--misc/cgo/test/Makefile1
-rw-r--r--misc/cgo/test/exports.go12
2 files changed, 13 insertions, 0 deletions
diff --git a/misc/cgo/test/Makefile b/misc/cgo/test/Makefile
index 43c45f416..f26f97289 100644
--- a/misc/cgo/test/Makefile
+++ b/misc/cgo/test/Makefile
@@ -11,6 +11,7 @@ CGOFILES=\
basic.go\
callback.go\
env.go\
+ exports.go\
issue1222.go\
issue1328.go\
issue1560.go\
diff --git a/misc/cgo/test/exports.go b/misc/cgo/test/exports.go
new file mode 100644
index 000000000..f96c60b00
--- /dev/null
+++ b/misc/cgo/test/exports.go
@@ -0,0 +1,12 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cgotest
+
+import "C"
+
+//export ReturnIntLong
+func ReturnIntLong() (int, C.long) {
+ return 1, 2
+}