llgo/c/lua:table & coroutine

This commit is contained in:
luoliwoshang
2024-06-30 19:35:45 +08:00
parent 7a294e6d4e
commit a5d7fc484a
10 changed files with 419 additions and 125 deletions

View File

@@ -12,7 +12,7 @@ func main() {
defer L.Close()
L.OpenLibs()
if res := L.Dostring(c.Str("function combineParams(num, str) return 'Result: ' .. str .. ' ' .. num end")); res != lua.OK {
if res := L.DoString(c.Str("function combineParams(num, str) return 'Result: ' .. str .. ' ' .. num end")); res != lua.OK {
c.Printf(c.Str("error: %s\n"), L.ToString(-1))
}
L.GetGlobal(c.Str("combineParams"))