- luaL_openlib(L, HOST_MODULE_NAME, host_functions, 0);
- /* simgrid.host */
+ lua_getglobal(L, "simgrid"); /* simgrid */
+ luaL_newlib(L, host_functions); /* simgrid simgrid.host */
+ lua_setfield(L, -2, "host"); /* simgrid */
+ lua_getfield(L, -1, "host"); /* simgrid simgrid.host */