From: Cherry Zhang Date: Wed, 29 Nov 2017 20:58:43 +0000 (-0500) Subject: cmd/internal/objfile: make lookupFunc an alias type X-Git-Tag: go1.10beta1~104 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a7dcfa6133cac2c1200d8003bae279a062268499;p=gostls13.git cmd/internal/objfile: make lookupFunc an alias type 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 Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/internal/objfile/disasm.go b/src/cmd/internal/objfile/disasm.go index c486016d6c..6ddf8d6cd7 100644 --- a/src/cmd/internal/objfile/disasm.go +++ b/src/cmd/internal/objfile/disasm.go @@ -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) {