diff options
| -rw-r--r-- | loadlib.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: loadlib.c,v 1.34 2005/07/13 19:02:42 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.35 2005/08/01 04:21:17 roberto Exp roberto $ |
| 3 | ** Dynamic library loader for Lua | 3 | ** Dynamic library loader for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | ** | 5 | ** |
| @@ -607,6 +607,10 @@ LUALIB_API int luaopen_loadlib (lua_State *L) { | |||
| 607 | lua_setfield(L, -2, "loaders"); /* put it in field `loaders' */ | 607 | lua_setfield(L, -2, "loaders"); /* put it in field `loaders' */ |
| 608 | setpath(L, "path", LUA_PATH, LUA_PATH_DEFAULT); /* set field `path' */ | 608 | setpath(L, "path", LUA_PATH, LUA_PATH_DEFAULT); /* set field `path' */ |
| 609 | setpath(L, "cpath", LUA_CPATH, LUA_CPATH_DEFAULT); /* set field `cpath' */ | 609 | setpath(L, "cpath", LUA_CPATH, LUA_CPATH_DEFAULT); /* set field `cpath' */ |
| 610 | /* store config information */ | ||
| 611 | lua_pushstring(L, LUA_DIRSEP "\n" LUA_PATHSEP "\n" LUA_PATH_MARK "\n" | ||
| 612 | LUA_EXECDIR "\n" LUA_IGMARK); | ||
| 613 | lua_setfield(L, -2, "config"); | ||
| 610 | /* set field `loaded' */ | 614 | /* set field `loaded' */ |
| 611 | lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); | 615 | lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); |
| 612 | lua_setfield(L, -2, "loaded"); | 616 | lua_setfield(L, -2, "loaded"); |
