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

Method SetInt32

config.go:244–258  ·  view source on GitHub ↗
(name string, value int32)

Source from the content-addressed store, hash-verified

242}
243
244func (c *Config) SetInt32(name string, value int32) (err error) {
245 cname := C.CString(name)
246 defer C.free(unsafe.Pointer(cname))
247
248 runtime.LockOSThread()
249 defer runtime.UnlockOSThread()
250
251 ret := C.git_config_set_int32(c.ptr, cname, C.int32_t(value))
252 runtime.KeepAlive(c)
253 if ret < 0 {
254 return MakeGitError(ret)
255 }
256
257 return nil
258}
259
260func (c *Config) SetInt64(name string, value int64) (err error) {
261 cname := C.CString(name)

Callers 1

setupConfigFunction · 0.80

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by 1

setupConfigFunction · 0.64