Commit 259a9742 authored by Russ Cox's avatar Russ Cox

cgo: rename internal f to avoid conflict with possible C global named f

Fixes #1452.

R=r
CC=golang-dev
https://golang.org/cl/4023060
parent 8a2891fc
......@@ -288,7 +288,7 @@ func (p *Package) guessKinds(f *File) []*Name {
var b bytes.Buffer
b.WriteString(builtinProlog)
b.WriteString(f.Preamble)
b.WriteString("void f(void) {\n")
b.WriteString("void __cgo__f__(void) {\n")
b.WriteString("#line 0 \"cgo-test\"\n")
for i, n := range toSniff {
fmt.Fprintf(&b, "%s; enum { _cgo_enum_%d = %s }; /* cgo-test:%d */\n", n.C, i, n.C, i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment