¡@

Home 

c++ Programming Glossary: lua_gettop

Iterating through a Lua table from C++?

http://stackoverflow.com/questions/1438842/iterating-through-a-lua-table-from-c

can't get it to work. Log Get .Write engine stack size i lua_gettop L lua_getglobal L level if lua_istable L 1 Log Get .Write engine.. .Write engine num i i Log Get .Write engine stack size i lua_gettop L if lua_istable L 3 Log Get .Write engine 3 is now table lua_pop.. now table lua_pop L 1 Log Get .Write engine stack size i lua_gettop L if lua_istable L 2 Log Get .Write engine 2 is now table pred..

How to create nested Lua tables using the C API

http://stackoverflow.com/questions/1630169/how-to-create-nested-lua-tables-using-the-c-api

C API My current approach is lua_createtable L 0 2 int c lua_gettop L lua_pushstring L a lua_pushnumber L 4 lua_settable L c lua_pushstring.. this loop I use lua_createtable L 2 0 int outertable lua_gettop L to create the outer table for 2 numeric slots. But how can..

Redirecting/redefining print() for embedded Lua

http://stackoverflow.com/questions/4508119/redirecting-redefining-print-for-embedded-lua

statement in C static int l_my_print lua_State L int nargs lua_gettop L for int i 1 i nargs i if lua_isstring L i Pop the next arg..

How do I create a Lua Table in C++, and pass it to a Lua function?

http://stackoverflow.com/questions/453769/how-do-i-create-a-lua-table-in-c-and-pass-it-to-a-lua-function

if you want a real lua table lua_newtable L int top lua_gettop L for std map iterator it mymap.begin it mymap.end it const..

Managing stack with Lua and C++

http://stackoverflow.com/questions/6511432/managing-stack-with-lua-and-c

0 0 lua_gettable L LUA_GLOBALSINDEX lua_pcall L 1 1 0 if lua_gettop L 1 lua_istable L 1 int len lua_objlen L 1 for int i 1 i len..