From: Russ Cox Date: Fri, 18 Dec 2009 01:04:48 +0000 (-0800) Subject: cgo: include line number information to keep go/printer happy X-Git-Tag: weekly.2009-12-22~17 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=044ebae2f0750921e13acf307a12130b4fab17d2;p=gostls13.git cgo: include line number information to keep go/printer happy Fixes #443. R=dho CC=golang-dev https://golang.org/cl/179095 --- diff --git a/src/cmd/cgo/main.go b/src/cmd/cgo/main.go index c3e319f92c..d1b551b555 100644 --- a/src/cmd/cgo/main.go +++ b/src/cmd/cgo/main.go @@ -94,7 +94,8 @@ func main() { case "call": if !cref.TypeName { // Is an actual function call. - *cref.Expr = &ast.Ident{Value: "_C_" + cref.Name} + pos := (*cref.Expr).Pos() + *cref.Expr = &ast.Ident{Position: pos, Value: "_C_" + cref.Name} p.Funcdef[cref.Name] = cref.FuncType break }