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
commit45157f67aeeedba8bfb5cf46799f7967af9c6e8e (patch)
treeae7efb80362de292332687c14380825996251b9b /src/cmd/api
parenta7e2b08915f3f88a97bc4dfa0d2d66e2eb6993a7 (diff)
downloadgo-45157f67aeeedba8bfb5cf46799f7967af9c6e8e.tar.gz
runtime: remove a few untyped allocations
LGTM=iant, khr, rlh R=khr, iant, bradfitz, rlh CC=dvyukov, golang-codereviews https://codereview.appspot.com/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 fb0e984f7..da0dc4a92 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;" +