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

Function makeCStringsFromStrings

remote.go:898–907  ·  view source on GitHub ↗
(s []string)

Source from the content-addressed store, hash-verified

896}
897
898func makeCStringsFromStrings(s []string) **C.char {
899 l := len(s)
900 x := (**C.char)(C.malloc(C.size_t(unsafe.Sizeof(unsafe.Pointer(nil)) * uintptr(l))))
901 i := 0
902 for p := uintptr(unsafe.Pointer(x)); i < l; p += unsafe.Sizeof(uintptr(0)) {
903 *(**C.char)(unsafe.Pointer(p)) = C.CString(s[i])
904 i++
905 }
906 return x
907}
908
909func freeStrarray(arr *C.git_strarray) {
910 count := int(arr.count)

Callers 12

AddAllMethod · 0.85
UpdateAllMethod · 0.85
RemoveAllMethod · 0.85
StatusListMethod · 0.85
populateDiffOptionsFunction · 0.85
ResetDefaultToCommitMethod · 0.85
populateCheckoutOptionsFunction · 0.85
populateFetchOptionsFunction · 0.85
populatePushOptionsFunction · 0.85
FetchMethod · 0.85
ConnectMethod · 0.85
PushMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…