detail (changing some names of macros)
This commit is contained in:
20
loadlib.c
20
loadlib.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: loadlib.c,v 1.110 2012/04/26 19:38:52 roberto Exp roberto $
|
||||
** $Id: loadlib.c,v 1.111 2012/05/30 12:33:44 roberto Exp roberto $
|
||||
** Dynamic library loader for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
**
|
||||
@@ -31,21 +31,21 @@
|
||||
|
||||
|
||||
/*
|
||||
** LUA_PATH and LUA_CPATH are the names of the environment
|
||||
** LUA_PATH_VAR and LUA_CPATH_VAR are the names of the environment
|
||||
** variables that Lua check to set its paths.
|
||||
*/
|
||||
#if !defined(LUA_PATH)
|
||||
#define LUA_PATH "LUA_PATH"
|
||||
#if !defined(LUA_PATH_VAR)
|
||||
#define LUA_PATH_VAR "LUA_PATH"
|
||||
#endif
|
||||
|
||||
#if !defined(LUA_CPATH)
|
||||
#define LUA_CPATH "LUA_CPATH"
|
||||
#if !defined(LUA_CPATH_VAR)
|
||||
#define LUA_CPATH_VAR "LUA_CPATH"
|
||||
#endif
|
||||
|
||||
#define LUA_PATHSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR
|
||||
|
||||
#define LUA_PATHVERSION LUA_PATH LUA_PATHSUFFIX
|
||||
#define LUA_CPATHVERSION LUA_CPATH LUA_PATHSUFFIX
|
||||
#define LUA_PATHVARVERSION LUA_PATH_VAR LUA_PATHSUFFIX
|
||||
#define LUA_CPATHVARVERSION LUA_CPATH_VAR LUA_PATHSUFFIX
|
||||
|
||||
/*
|
||||
** LUA_PATH_SEP is the character that separates templates in a path.
|
||||
@@ -703,9 +703,9 @@ LUAMOD_API int luaopen_package (lua_State *L) {
|
||||
#endif
|
||||
lua_setfield(L, -2, "searchers"); /* put it in field 'searchers' */
|
||||
/* set field 'path' */
|
||||
setpath(L, "path", LUA_PATHVERSION, LUA_PATH, LUA_PATH_DEFAULT);
|
||||
setpath(L, "path", LUA_PATHVARVERSION, LUA_PATH_VAR, LUA_PATH_DEFAULT);
|
||||
/* set field 'cpath' */
|
||||
setpath(L, "cpath", LUA_CPATHVERSION, LUA_CPATH, LUA_CPATH_DEFAULT);
|
||||
setpath(L, "cpath", LUA_CPATHVARVERSION, LUA_CPATH_VAR, LUA_CPATH_DEFAULT);
|
||||
/* store config information */
|
||||
lua_pushliteral(L, LUA_DIRSEP "\n" LUA_PATH_SEP "\n" LUA_PATH_MARK "\n"
|
||||
LUA_EXEC_DIR "\n" LUA_IGMARK "\n");
|
||||
|
||||
Reference in New Issue
Block a user