MCPcopy
hub / github.com/mudler/LocalAI / cstr

Method cstr

backend/go/parakeet-cpp/live_test.go:29–35  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

27}
28
29func (p *liveCstrPool) cstr(s string) uintptr {
30 p.mu.Lock()
31 defer p.mu.Unlock()
32 b := append([]byte(s), 0)
33 p.bufs = append(p.bufs, b)
34 return uintptr(unsafe.Pointer(&b[0]))
35}
36
37// liveStubs swaps every C entry point the live path touches and returns a
38// restore func for AfterEach.

Callers 1

live_test.goFile · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected