mirror of
https://github.com/golang/go
synced 2024-11-25 11:57:58 -07:00
cgo: don't overwrite p.Crefs
It's expected to be shared between all files so that all types are output. Fixes bug reported on mailing list by Peter Froehlich. R=rsc, phf CC=golang-dev https://golang.org/cl/183043
This commit is contained in:
parent
3f25c8a2ef
commit
7c9111434a
@ -118,7 +118,9 @@ func openProg(name string, p *Prog) {
|
||||
}
|
||||
|
||||
// Accumulate pointers to uses of C.x.
|
||||
if p.Crefs == nil {
|
||||
p.Crefs = make([]*Cref, 0, 8)
|
||||
}
|
||||
walk(p.AST, p, "prog")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user