| func unpackEFace(obj interface{}) *eface { |
| return (*eface)(unsafe.Pointer(&obj)) |
| func packEFace(rtype unsafe.Pointer, data unsafe.Pointer) interface{} { |
| e := (*eface)(unsafe.Pointer(&i)) |
| type UnsafeEFaceType struct { |
| func newUnsafeEFaceType(cfg *frozenConfig, type1 reflect.Type) *UnsafeEFaceType { |
| unsafeType: *newUnsafeType(cfg, type1), |
| func (type2 *UnsafeEFaceType) IsNil(obj interface{}) bool { |
| objEFace := unpackEFace(obj) |
| assertType("Type.IsNil argument 1", type2.ptrRType, objEFace.rtype) |
| return type2.UnsafeIsNil(objEFace.data) |
| func (type2 *UnsafeEFaceType) UnsafeIsNil(ptr unsafe.Pointer) bool { |
| return unpackEFace(*(*interface{})(ptr)).data == nil |
| func (type2 *UnsafeEFaceType) Indirect(obj interface{}) interface{} { |
| objEFace := unpackEFace(obj) |
| assertType("Type.Indirect argument 1", type2.ptrRType, objEFace.rtype) |
| return type2.UnsafeIndirect(objEFace.data) |
| func (type2 *UnsafeEFaceType) UnsafeIndirect(ptr unsafe.Pointer) interface{} { |
| return *(*interface{})(ptr) |