1
0
mirror of https://github.com/golang/go synced 2024-11-22 06:24:38 -07:00

cgo: include line number information to keep go/printer happy

Fixes #443.

R=dho
CC=golang-dev
https://golang.org/cl/179095
This commit is contained in:
Russ Cox 2009-12-17 17:04:48 -08:00
parent d85bb81878
commit 044ebae2f0

View File

@ -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
}