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

Method LookupInt32

config.go:90–105  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

88}
89
90func (c *Config) LookupInt32(name string) (int32, error) {
91 var out C.int32_t
92 cname := C.CString(name)
93 defer C.free(unsafe.Pointer(cname))
94
95 runtime.LockOSThread()
96 defer runtime.UnlockOSThread()
97
98 ret := C.git_config_get_int32(&out, c.ptr, cname)
99 runtime.KeepAlive(c)
100 if ret < 0 {
101 return 0, MakeGitError(ret)
102 }
103
104 return int32(out), nil
105}
106
107func (c *Config) LookupInt64(name string) (int64, error) {
108 var out C.int64_t

Callers 1

config_test.goFile · 0.80

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected