diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-10-07 11:20:31 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-10-07 11:20:31 -0300 |
commit | c5fcba1a17b6ccc3c706b40d77dffda78dbe53d6 (patch) | |
tree | 7d66c875947779cb5ae5a726cf46ca1979cab344 | |
parent | 4c6dfc342b026a51bfe3e2d56b1032fb670a2577 (diff) | |
download | lua-c5fcba1a17b6ccc3c706b40d77dffda78dbe53d6.tar.gz lua-c5fcba1a17b6ccc3c706b40d77dffda78dbe53d6.tar.bz2 lua-c5fcba1a17b6ccc3c706b40d77dffda78dbe53d6.zip |
detail (changing some names of macros)
-rw-r--r-- | loadlib.c | 20 | ||||
-rw-r--r-- | lua.c | 14 |
2 files changed, 17 insertions, 17 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"); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.205 2012/05/23 15:37:09 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.206 2012/09/29 20:07:06 roberto Exp roberto $ |
3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -31,12 +31,12 @@ | |||
31 | #define LUA_MAXINPUT 512 | 31 | #define LUA_MAXINPUT 512 |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #if !defined(LUA_INIT) | 34 | #if !defined(LUA_INIT_VAR) |
35 | #define LUA_INIT "LUA_INIT" | 35 | #define LUA_INIT_VAR "LUA_INIT" |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #define LUA_INITVERSION \ | 38 | #define LUA_INITVARVERSION \ |
39 | LUA_INIT "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR | 39 | LUA_INIT_VAR "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR |
40 | 40 | ||
41 | 41 | ||
42 | /* | 42 | /* |
@@ -421,10 +421,10 @@ static int runargs (lua_State *L, char **argv, int n) { | |||
421 | 421 | ||
422 | 422 | ||
423 | static int handle_luainit (lua_State *L) { | 423 | static int handle_luainit (lua_State *L) { |
424 | const char *name = "=" LUA_INITVERSION; | 424 | const char *name = "=" LUA_INITVARVERSION; |
425 | const char *init = getenv(name + 1); | 425 | const char *init = getenv(name + 1); |
426 | if (init == NULL) { | 426 | if (init == NULL) { |
427 | name = "=" LUA_INIT; | 427 | name = "=" LUA_INIT_VAR; |
428 | init = getenv(name + 1); /* try alternative name */ | 428 | init = getenv(name + 1); /* try alternative name */ |
429 | } | 429 | } |
430 | if (init == NULL) return LUA_OK; | 430 | if (init == NULL) return LUA_OK; |