[WIP/RFC] Pointer indirection #196

Merged
pks-t merged 15 commits from pointer-indirection into master 2015-05-30 15:23:23 -05:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 7ee534d0c5 - Show all commits

View File

@ -1,6 +1,7 @@
package git package git
import ( import (
"fmt"
"sync" "sync"
"unsafe" "unsafe"
) )
@ -72,7 +73,7 @@ func (v *HandleList) Get(handle unsafe.Pointer) interface{} {
v.RLock() v.RLock()
if _, ok := v.set[slot]; !ok { if _, ok := v.set[slot]; !ok {
panic("invalid pointer handle") panic(fmt.Sprintf("invalid pointer handle: %p", handle))
} }
ptr := v.handles[slot] ptr := v.handles[slot]