[WIP/RFC] Pointer indirection #196
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue