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

Function makeStringsFromCStrings

remote.go:888–896  ·  view source on GitHub ↗
(x **C.char, l int)

Source from the content-addressed store, hash-verified

886}
887
888func makeStringsFromCStrings(x **C.char, l int) []string {
889 s := make([]string, l)
890 i := 0
891 for p := uintptr(unsafe.Pointer(x)); i < l; p += unsafe.Sizeof(uintptr(0)) {
892 s[i] = C.GoString(sptr(p))
893 i++
894 }
895 return s
896}
897
898func makeCStringsFromStrings(s []string) **C.char {
899 l := len(s)

Callers 7

DefaultDiffOptionsFunction · 0.85
ListMethod · 0.85
ListWithMatchMethod · 0.85
ListMethod · 0.85
RenameMethod · 0.85
FetchRefspecsMethod · 0.85
PushRefspecsMethod · 0.85

Calls 1

sptrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…