MCPcopy Create free account
hub / github.com/libgit2/git2go / Track

Method Track

handles.go:29–37  ·  view source on GitHub ↗

Track adds the given pointer to the list of pointers to track and returns a pointer value which can be passed to C as an opaque pointer.

(pointer interface{})

Source from the content-addressed store, hash-verified

27// returns a pointer value which can be passed to C as an opaque
28// pointer.
29func (v *HandleList) Track(pointer interface{}) unsafe.Pointer {
30 handle := C.malloc(1)
31
32 v.Lock()
33 v.handles[handle] = pointer
34 v.Unlock()
35
36 return handle
37}
38
39// Untrack stops tracking the pointer given by the handle
40func (v *HandleList) Untrack(handle unsafe.Pointer) {

Callers 15

populateRebaseOptionsFunction · 0.80
AddAllMethod · 0.80
UpdateAllMethod · 0.80
RemoveAllMethod · 0.80
WalkMethod · 0.80
ForEachMethod · 0.80
populateDiffOptionsFunction · 0.80
DiffBlobsFunction · 0.80
populateApplyOptionsFunction · 0.80
ForeachMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected