]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: permit passing string values directly between Go and C
authorIan Lance Taylor <iant@golang.org>
Sat, 14 Oct 2017 01:26:10 +0000 (18:26 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 15 Nov 2017 03:36:54 +0000 (03:36 +0000)
commit918396b3e11cbb65bf7ef2423a4379e7373828cb
treeace32e12c2787254bbd52bfb66d2ff8ebf0b7332
parent707a4d3fed2e3de3bb08508b31279161bedb8df8
cmd/cgo: permit passing string values directly between Go and C

Permit the C preamble to use the _GoString_ type. Permit Go code to
pass string values directly to those C types. Add accessors for C
code to retrieve sizes and pointers.

Fixes #6907

Change-Id: I190c88319ec88a3ef0ddb99f342a843ba69fcaa3
Reviewed-on: https://go-review.googlesource.com/70890
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
misc/cgo/test/cgo_test.go
misc/cgo/test/issue6907.go [new file with mode: 0644]
misc/cgo/test/issue6907export.go [new file with mode: 0644]
misc/cgo/test/issue6907export_c.c [new file with mode: 0644]
src/cmd/cgo/doc.go
src/cmd/cgo/gcc.go
src/cmd/cgo/out.go