mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
f7ea448256
The data dir string is returned to Go as a byte array of the UTF-8 encoded string, but it is not NUL terminated. Signed-off-by: Elias Naur <mail@eliasnaur.com>
18 lines
279 B
Go
18 lines
279 B
Go
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
// +build android
|
|
|
|
package app
|
|
|
|
import "C"
|
|
|
|
var dataDir func() (string, error)
|
|
|
|
//export setDataDir
|
|
func setDataDir(cdir *C.char, len C.int) {
|
|
dir := C.GoStringN(cdir, len)
|
|
dataDir = func() (string, error) {
|
|
return dir, nil
|
|
}
|
|
}
|