Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #126 from xushiwei/q
Browse files Browse the repository at this point in the history
autoStaticName: fix #125
  • Loading branch information
xushiwei committed Jul 23, 2022
2 parents 9c06d0b + 73b3507 commit 5c5850e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cl/multifiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ func checkAnonyUnion(typ types.Type) (t *types.Named, ok bool) {
}

func (p *blockCtx) autoStaticName(name string) string {
*p.base++
return name + "_cgo" + strconv.Itoa(*p.base) + p.baseOF
return "_cgos_" + name + "_" + p.baseOF
}

func (p *blockCtx) logFile(node *ast.Node) {
Expand Down
2 changes: 1 addition & 1 deletion cl/type_and_var_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void test() {
}
`, `func test() {
var a int32 = int32(255)
if b_cgo1 == int64(-1) {
if _cgos_b_ == int64(-1) {
a = int32(3)
}
}`)
Expand Down

0 comments on commit 5c5850e

Please sign in to comment.