From 44753479c60f66ee3051ddc0bf5d420b2a1bf662 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 12 Sep 2014 16:12:39 -0400 Subject: runtime: remove a few untyped allocations LGTM=iant, khr, rlh R=khr, iant, bradfitz, rlh CC=dvyukov, golang-codereviews https://golang.org/cl/142030044 --- src/cmd/api/goapi.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/cmd/api') 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;" + -- cgit v1.3-5-g9baa