]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/objfile: make lookupFunc an alias type
authorCherry Zhang <cherryyz@google.com>
Wed, 29 Nov 2017 20:58:43 +0000 (15:58 -0500)
committerCherry Zhang <cherryyz@google.com>
Wed, 29 Nov 2017 22:22:38 +0000 (22:22 +0000)
In the x/arch repo, CL 45098 introduced SymLookup type, replacing
the unnamed function type for lookup functions. This affects the
signature of x86asm.GoSyntax. In particular, it cannot convert
one named type, namely lookupFunc, to the other without an
explicit cast. Make lookupFunc unnamed to fix.

Change-Id: I973300d29ef1dbfdbd7fc2429e89c5849e6a7329
Reviewed-on: https://go-review.googlesource.com/80842
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/internal/objfile/disasm.go

index c486016d6cee7c928e3a9ac0087c555650753e29..6ddf8d6cd7df9912097dffa4fd30558a29e766fe 100644 (file)
@@ -292,7 +292,7 @@ func (d *Disasm) Decode(start, end uint64, relocs []Reloc, f func(pc, size uint6
        }
 }
 
-type lookupFunc func(addr uint64) (sym string, base uint64)
+type lookupFunc func(addr uint64) (sym string, base uint64)
 type disasmFunc func(code []byte, pc uint64, lookup lookupFunc, ord binary.ByteOrder) (text string, size int)
 
 func disasm_386(code []byte, pc uint64, lookup lookupFunc, _ binary.ByteOrder) (string, int) {