summaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-12 16:12:39 -0400
committerRuss Cox <rsc@golang.org>2014-09-12 16:12:39 -0400
commit44753479c60f66ee3051ddc0bf5d420b2a1bf662 (patch)
treef49cafa7902a5624c9ec41e5b8e962ab102da13e /src/cmd/api
parenta14c1c986eba6ca6a35bfb9feb833b8eff53c7b1 (diff)
downloadgo-git-44753479c60f66ee3051ddc0bf5d420b2a1bf662.tar.gz
runtime: remove a few untyped allocations
LGTM=iant, khr, rlh R=khr, iant, bradfitz, rlh CC=dvyukov, golang-codereviews https://golang.org/cl/142030044
Diffstat (limited to 'src/cmd/api')
-rw-r--r--src/cmd/api/goapi.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go
index fb0e984f72..da0dc4a923 100644
--- a/src/cmd/api/goapi.go
+++ b/src/cmd/api/goapi.go
@@ -377,7 +377,7 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) {
}
}
if w.context != nil && file == fmt.Sprintf("zruntime_defs_%s_%s.go", w.context.GOOS, w.context.GOARCH) {
- // Just enough to keep the api checker happy.
+ // Just enough to keep the api checker happy. Keep sorted.
src := "package runtime; type (" +
" _defer struct{};" +
" _func struct{};" +
@@ -388,6 +388,7 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) {
" chantype struct{};" +
" context struct{};" + // windows
" eface struct{};" +
+ " epollevent struct{};" +
" funcval struct{};" +
" g struct{};" +
" gobuf struct{};" +
@@ -395,20 +396,20 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) {
" iface struct{};" +
" interfacetype struct{};" +
" itab struct{};" +
+ " keventt struct{};" +
" m struct{};" +
" maptype struct{};" +
" mcache struct{};" +
" mspan struct{};" +
" mutex struct{};" +
" note struct{};" +
+ " p struct{};" +
" slicetype struct{};" +
" stkframe struct{};" +
" sudog struct{};" +
+ " timespec struct{};" +
" waitq struct{};" +
" wincallbackcontext struct{};" +
- " keventt struct{};" +
- " timespec struct{};" +
- " epollevent struct{};" +
"); " +
"const (" +
" cb_max = 2000;" +