mirror of
https://github.com/golang/go
synced 2024-11-25 03:47:57 -07:00
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
This commit is contained in:
parent
8a2891fc56
commit
259a974292
@ -288,7 +288,7 @@ func (p *Package) guessKinds(f *File) []*Name {
|
|||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
b.WriteString(builtinProlog)
|
b.WriteString(builtinProlog)
|
||||||
b.WriteString(f.Preamble)
|
b.WriteString(f.Preamble)
|
||||||
b.WriteString("void f(void) {\n")
|
b.WriteString("void __cgo__f__(void) {\n")
|
||||||
b.WriteString("#line 0 \"cgo-test\"\n")
|
b.WriteString("#line 0 \"cgo-test\"\n")
|
||||||
for i, n := range toSniff {
|
for i, n := range toSniff {
|
||||||
fmt.Fprintf(&b, "%s; enum { _cgo_enum_%d = %s }; /* cgo-test:%d */\n", n.C, i, n.C, i)
|
fmt.Fprintf(&b, "%s; enum { _cgo_enum_%d = %s }; /* cgo-test:%d */\n", n.C, i, n.C, i)
|
||||||
|
Loading…
Reference in New Issue
Block a user