llgo/c/lua:link style

This commit is contained in:
luoliwoshang
2024-07-13 22:57:01 +08:00
parent 9edeee4b3f
commit de4b5b70da
12 changed files with 225 additions and 183 deletions

View File

@@ -8,10 +8,14 @@ import (
)
func main() {
L := lua.NewState()
L := lua.Newstate()
defer L.Close()
L.OpenLibs()
if res := L.DoString(c.Str("print('hello world')")); res != lua.OK {
L.Openlibs()
if res := L.Dostring(c.Str("print('hello world')")); res != lua.OK {
println("error")
}
}
/* Expected output:
hello world
*/