c/lua:alloc

This commit is contained in:
luoliwoshang
2024-09-16 23:12:33 +08:00
parent c6345279cc
commit e3cb4ebfdc
19 changed files with 60 additions and 37 deletions

View File

@@ -17,7 +17,7 @@ func printStack(L *lua.State, stateName *c.Char) {
func main() {
// Create a new Lua state and open libraries
L := lua.Newstate()
L := lua.Newstate__1()
defer L.Close()
L.Openlibs()
@@ -68,7 +68,7 @@ func main() {
printStack(L, c.Str("L1"))
// Create a second Lua state
L1 := lua.Newstate()
L1 := lua.Newstate__1()
defer L1.Close()
// Move two elements to the new state