go/src
Ian Lance Taylor 689947d565 cmd/cgo: only record typedef name for pointer to struct
In a function argument, we handle a typedef for a pointer specially,
using the pointer type rather than the typedef, to permit the Go calls
to match the laxer type conversions permitted in C. We record the
typedef so that we use that type in the C code, in case it has a special
attribute. However, using the typedef is wrong when using a pointer to a
basic type, because the C code may sometimes use the typedef and
sometimes not, and using the typedef in all cases will cause incorrect
type errors on the Go side. Fortunately we only really need to use the
typedef when pointing to a struct/union/class, and in such a case
confusion is unlikely.

Fixes #17723.

Change-Id: Id2eaeb156faeaf2e8eb9cf0b8f95b44caf8cfbd2
Reviewed-on: https://go-review.googlesource.com/32536
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-11-01 23:06:24 +00:00
..
archive archive/tar: validate sparse headers in parsePAX 2016-10-22 16:35:14 +00:00
bufio bufio: remove unnecessary "continue" 2016-10-24 14:49:44 +00:00
builtin
bytes bytes,strings: use IndexByte more often in Index on AMD64 2016-11-01 18:30:52 +00:00
cmd cmd/cgo: only record typedef name for pointer to struct 2016-11-01 23:06:24 +00:00
compress compress/flate: tighten the BestSpeed max match offset bound. 2016-10-30 22:52:14 +00:00
container
context context: add comments to the WithCancel example, apply minor improvements 2016-10-26 22:35:07 +00:00
crypto crypto/sha256: improve performance for sha256.block on ppc64le 2016-10-31 19:14:01 +00:00
database/sql database/sql: correctly spell constants 2016-10-31 17:17:46 +00:00
debug cmd/dist: use debug/pe directly for cmd/link 2016-10-17 15:22:17 +00:00
encoding encoding/json: marshal with null when RawMessage is nil 2016-11-01 05:42:33 +00:00
errors
expvar expvar: add Value methods 2016-10-13 21:39:03 +00:00
flag flag: arrange for FlagSet.Usage to be non-nil by default 2016-10-26 16:13:40 +00:00
fmt fmt: document that unexported struct fields don't get the String/Error treatment 2016-10-26 13:56:45 +00:00
go go/importer: handle multiple imports of the same object 2016-11-01 22:32:45 +00:00
hash
html html/template, text/template: drop defined template list from errors 2016-10-28 17:10:55 +00:00
image image/png: implement grayscale transparency. 2016-10-28 02:10:13 +00:00
index/suffixarray
internal runtime/trace, internal/trace: script to collect canned traces 2016-10-28 17:46:49 +00:00
io io: clarify Pipe docs 2016-10-18 12:53:56 +00:00
log all: freeze net/rpc and reword the 'frozen' message in other frozen packages 2016-10-26 16:11:07 +00:00
math math/big: flip long/short flag on TestFloat32Distribution 2016-10-27 21:44:37 +00:00
mime mime/multipart: simplify Part.Read 2016-10-28 19:05:47 +00:00
net net/http: make Transport reject URLs with bogus ports with non-digits 2016-11-01 18:32:38 +00:00
os os: adjust (*File).Read comment 2016-10-28 19:19:11 +00:00
path path/filepath: fix Abs on Windows 2016-10-29 16:44:45 +00:00
plugin plugin: do not leak cRelName on error path 2016-11-01 16:04:28 +00:00
reflect reflect: clarify that NumMethod returns only the number of exported methods 2016-10-31 17:17:05 +00:00
regexp regexp: avoid alloc in QuoteMeta when not quoting 2016-10-19 07:09:08 +00:00
runtime runtime: resolve type offsets using source module 2016-11-01 20:28:17 +00:00
sort sort: fix a slice benchmark not using the stable variant, add another 2016-10-05 14:43:23 +00:00
strconv strconv: strip \r in raw strings passed to Unquote 2016-10-17 18:34:02 +00:00
strings bytes,strings: use IndexByte more often in Index on AMD64 2016-11-01 18:30:52 +00:00
sync sync: enable Pool when using race detector 2016-10-30 19:09:20 +00:00
syscall syscall: remove X__cmsg_data from Cmsghdr 2016-10-30 19:04:09 +00:00
testing testing: add a method testing.CoverMode 2016-11-01 18:12:04 +00:00
text html/template, text/template: drop defined template list from errors 2016-10-28 17:10:55 +00:00
time time: simplify: tell people to not use == with Time values 2016-11-01 19:57:35 +00:00
unicode unicode/utf8: optimize ValidRune 2016-10-26 23:02:52 +00:00
unsafe
vendor/golang_org/x vendor/golang_org/text/unicode/norm: re-vendor 2016-10-31 19:27:05 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash cmd/dist, cmd/go: add environment variable override for pkg-config 2016-10-03 18:08:01 +00:00
make.bat
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc