diff options
Diffstat (limited to 'loadlib.c')
| -rw-r--r-- | loadlib.c | 20 |
1 files changed, 10 insertions, 10 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: loadlib.c,v 1.110 2012/04/26 19:38:52 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.111 2012/05/30 12:33:44 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 | ** |
| @@ -31,21 +31,21 @@ | |||
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | ** LUA_PATH and LUA_CPATH are the names of the environment | 34 | ** LUA_PATH_VAR and LUA_CPATH_VAR are the names of the environment |
| 35 | ** variables that Lua check to set its paths. | 35 | ** variables that Lua check to set its paths. |
| 36 | */ | 36 | */ |
| 37 | #if !defined(LUA_PATH) | 37 | #if !defined(LUA_PATH_VAR) |
| 38 | #define LUA_PATH "LUA_PATH" | 38 | #define LUA_PATH_VAR "LUA_PATH" |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | #if !defined(LUA_CPATH) | 41 | #if !defined(LUA_CPATH_VAR) |
| 42 | #define LUA_CPATH "LUA_CPATH" | 42 | #define LUA_CPATH_VAR "LUA_CPATH" |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | #define LUA_PATHSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR | 45 | #define LUA_PATHSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR |
| 46 | 46 | ||
| 47 | #define LUA_PATHVERSION LUA_PATH LUA_PATHSUFFIX | 47 | #define LUA_PATHVARVERSION LUA_PATH_VAR LUA_PATHSUFFIX |
| 48 | #define LUA_CPATHVERSION LUA_CPATH LUA_PATHSUFFIX | 48 | #define LUA_CPATHVARVERSION LUA_CPATH_VAR LUA_PATHSUFFIX |
| 49 | 49 | ||
| 50 | /* | 50 | /* |
| 51 | ** LUA_PATH_SEP is the character that separates templates in a path. | 51 | ** LUA_PATH_SEP is the character that separates templates in a path. |
| @@ -703,9 +703,9 @@ LUAMOD_API int luaopen_package (lua_State *L) { | |||
| 703 | #endif | 703 | #endif |
| 704 | lua_setfield(L, -2, "searchers"); /* put it in field 'searchers' */ | 704 | lua_setfield(L, -2, "searchers"); /* put it in field 'searchers' */ |
| 705 | /* set field 'path' */ | 705 | /* set field 'path' */ |
| 706 | setpath(L, "path", LUA_PATHVERSION, LUA_PATH, LUA_PATH_DEFAULT); | 706 | setpath(L, "path", LUA_PATHVARVERSION, LUA_PATH_VAR, LUA_PATH_DEFAULT); |
| 707 | /* set field 'cpath' */ | 707 | /* set field 'cpath' */ |
| 708 | setpath(L, "cpath", LUA_CPATHVERSION, LUA_CPATH, LUA_CPATH_DEFAULT); | 708 | setpath(L, "cpath", LUA_CPATHVARVERSION, LUA_CPATH_VAR, LUA_CPATH_DEFAULT); |
| 709 | /* store config information */ | 709 | /* store config information */ |
| 710 | lua_pushliteral(L, LUA_DIRSEP "\n" LUA_PATH_SEP "\n" LUA_PATH_MARK "\n" | 710 | lua_pushliteral(L, LUA_DIRSEP "\n" LUA_PATH_SEP "\n" LUA_PATH_MARK "\n" |
| 711 | LUA_EXEC_DIR "\n" LUA_IGMARK "\n"); | 711 | LUA_EXEC_DIR "\n" LUA_IGMARK "\n"); |
