iface: todo
This commit is contained in:
@@ -13,11 +13,6 @@ type eface struct {
|
||||
data unsafe.Pointer
|
||||
}
|
||||
|
||||
/*
|
||||
func efaceOf(ep *any) *eface {
|
||||
return (*eface)(unsafe.Pointer(ep))
|
||||
}
|
||||
|
||||
type iface struct {
|
||||
tab *itab
|
||||
data unsafe.Pointer
|
||||
@@ -35,6 +30,11 @@ type itab struct {
|
||||
fun [1]uintptr // variable sized. fun[0]==0 means _type does not implement inter.
|
||||
}
|
||||
|
||||
/*
|
||||
func efaceOf(ep *any) *eface {
|
||||
return (*eface)(unsafe.Pointer(ep))
|
||||
}
|
||||
|
||||
func MakeInterface(inter *InterfaceType, typ *Type, data unsafe.Pointer) Interface {
|
||||
tab := &itab{inter: inter, _type: typ, hash: 0, fun: [1]uintptr{0}}
|
||||
return Interface{
|
||||
|
||||
Reference in New Issue
Block a user