diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-20 16:09:05 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-20 16:09:05 -0300 |
| commit | 38da9d568a4702a6f9405882db56c2a2aa3189c1 (patch) | |
| tree | 2be313995c06dd80b8dcf6ccf8434b6ba7df1b30 /loadlib.c | |
| parent | f21e9c172f9f15d8d7501e35635e78dc11f5ff58 (diff) | |
| download | lua-38da9d568a4702a6f9405882db56c2a2aa3189c1.tar.gz lua-38da9d568a4702a6f9405882db56c2a2aa3189c1.tar.bz2 lua-38da9d568a4702a6f9405882db56c2a2aa3189c1.zip | |
better use defined/undefined as flag values for macros
Diffstat (limited to 'loadlib.c')
| -rw-r--r-- | loadlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: loadlib.c,v 1.27 2005/05/16 21:19:00 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.28 2005/05/17 19:49:15 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 | ** |
| @@ -315,7 +315,7 @@ static int loader_Lua (lua_State *L) { | |||
| 315 | const char *name = luaL_checkstring(L, 1); | 315 | const char *name = luaL_checkstring(L, 1); |
| 316 | const char *fname = luaL_gsub(L, name, ".", LUA_DIRSEP); | 316 | const char *fname = luaL_gsub(L, name, ".", LUA_DIRSEP); |
| 317 | const char *path = NULL; | 317 | const char *path = NULL; |
| 318 | #if LUA_COMPAT_PATH | 318 | #if defined(LUA_COMPAT_PATH) |
| 319 | /* try first `LUA_PATH' for compatibility */ | 319 | /* try first `LUA_PATH' for compatibility */ |
| 320 | lua_pushstring(L, "LUA_PATH"); | 320 | lua_pushstring(L, "LUA_PATH"); |
| 321 | lua_rawget(L, LUA_GLOBALSINDEX); | 321 | lua_rawget(L, LUA_GLOBALSINDEX); |
| @@ -508,7 +508,7 @@ LUALIB_API int luaopen_loadlib (lua_State *L) { | |||
| 508 | lua_setfield(L, -2, "preload"); | 508 | lua_setfield(L, -2, "preload"); |
| 509 | /* create `loadlib' function */ | 509 | /* create `loadlib' function */ |
| 510 | lua_pushcfunction(L, ll_loadlib); | 510 | lua_pushcfunction(L, ll_loadlib); |
| 511 | #if LUA_COMPAT_LOADLIB | 511 | #if defined(LUA_COMPAT_LOADLIB) |
| 512 | lua_pushvalue(L, -1); | 512 | lua_pushvalue(L, -1); |
| 513 | lua_setfield(L, LUA_GLOBALSINDEX, "loadlib"); | 513 | lua_setfield(L, LUA_GLOBALSINDEX, "loadlib"); |
| 514 | #endif | 514 | #endif |
