diff options
| author | Ian Lance Taylor <[email protected]> | 2016-01-07 18:37:46 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <[email protected]> | 2016-01-07 18:37:46 -0800 |
| commit | 42b11d403d91e25754fe60c63c26371fbb7a89a9 (patch) | |
| tree | 8e5a0c18fb97a3d6b4272640d5a6104a73a4f0df /handles.go | |
| parent | 4ee13db86de9321cbea21c04c8608fb8f71735f3 (diff) | |
handles, merge, odb: changes for Go 1.6 pointer passing rules
See http://tip.golang.org/cmd/cgo/#hdr-Passing_pointers .
Diffstat (limited to 'handles.go')
| -rw-r--r-- | handles.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -52,12 +52,12 @@ func (v *HandleList) Track(pointer interface{}) unsafe.Pointer { v.Unlock() - return unsafe.Pointer(&slot) + return unsafe.Pointer(uintptr(slot)) } // Untrack stops tracking the pointer given by the handle func (v *HandleList) Untrack(handle unsafe.Pointer) { - slot := *(*int)(handle) + slot := int(uintptr(handle)) v.Lock() @@ -69,7 +69,7 @@ func (v *HandleList) Untrack(handle unsafe.Pointer) { // Get retrieves the pointer from the given handle func (v *HandleList) Get(handle unsafe.Pointer) interface{} { - slot := *(*int)(handle) + slot := int(uintptr(handle)) v.RLock() |
