Recently I have been exploring the luac 5.1 api and I was wondering if it is possible to loop through every global value in the 5.1 api, I know it is possible to do this in 5.2 ( referenced here ) as lua_pushglobaltable(lua_State*) exists. I know there is LUA_GLOBALSINDEX however I'm not sure how to use it for this purpose. Any help would be greatly appreciated!
Thanks :)