Skip to content

Commit

Permalink
document vlegio#4
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillDanshin committed Nov 18, 2016
1 parent 40cf3af commit e0af620
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions efaceconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ func init() {
}

// GetKind returns arg's kind
// panics if arg is a pointer to value
func GetKind(arg interface{}) uintptr {
return *(*uintptr)(unsafe.Pointer((*(*[2]uintptr)(unsafe.Pointer(&arg)))[0]))
}

// GetDataPtr returns pointer to arg's data
// panics if arg is a pointer to value
func GetDataPtr(arg interface{}) unsafe.Pointer {
return unsafe.Pointer((*(*[2]uintptr)(unsafe.Pointer(&arg)))[1])
}
Expand Down

0 comments on commit e0af620

Please sign in to comment.