CFuncPtr.Hash
This commit is contained in:
@@ -18,6 +18,8 @@ package ssa
|
||||
|
||||
import (
|
||||
"go/types"
|
||||
|
||||
"github.com/goplus/llgo/internal/typeutil"
|
||||
)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -46,6 +48,10 @@ type CFuncPtr types.Signature
|
||||
func (t *CFuncPtr) String() string { return (*types.Signature)(t).String() }
|
||||
func (t *CFuncPtr) Underlying() types.Type { return (*types.Signature)(t) }
|
||||
|
||||
func (t *CFuncPtr) Hash(h typeutil.Hasher) uint32 {
|
||||
return typeutil.HashSig(h, (*types.Signature)(t))*13 + 97
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// CType convert a C type into Go.
|
||||
|
||||
Reference in New Issue
Block a user