cString creates C string off the Go heap. ret is a *char.
(str string)
| 156 | // cString creates C string off the Go heap. |
| 157 | // ret is a *char. |
| 158 | func (ctx *context) cString(str string) (uintptr, func()) { |
| 159 | ptr := unsafe.Pointer(C.CString(str)) |
| 160 | return uintptr(ptr), func() { C.free(ptr) } |
| 161 | } |
| 162 | |
| 163 | // cStringPtr creates a pointer to a C string off the Go heap. |
| 164 | // ret is a **char. |
no outgoing calls
no test coverage detected