MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaL_get_global_variables

Function luaL_get_global_variables

src/Chain/libraries/glua/lapi.cpp:1458–1471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1456}
1457
1458void luaL_get_global_variables(lua_State *L, std::list<std::string> *list)
1459{
1460 if (nullptr == list)
1461 return;
1462 lua_getglobal(L, "_G");
1463 int it = lua_gettop(L);
1464 lua_pushnil(L);
1465 while (lua_next(L, it))
1466 {
1467 list->push_back(std::string(lua_tostring(L, -2)));
1468 lua_pop(L, 1);
1469 }
1470 lua_pop(L, 1);
1471}

Calls 6

lua_getglobalFunction · 0.85
lua_gettopFunction · 0.85
lua_pushnilFunction · 0.85
lua_nextFunction · 0.85
stringClass · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected