cgo - converting go string to c string -
in program, have function takes in string argument, , returns string in len(resultstring)
potentially 4 * len(argumentstring)
. because using cgo
c-file have imported project, , c function requires char *
4 times original length of string.
is there 'efficient' way of initializing , converting go string c string? because right initializing byte array in go, , string
ing that, , calling c.cstring
on string. causing performance issues if length of string large enough. thanks!
Comments
Post a Comment