Lua States
Lua is fully reentrant: it does not have any global variables. The whole state of the Lua interpreter is stored in a dynamically allocated structure of type lua_State; this state must be passed as the first argument to every function in the library (except lua_open below.)