From 38da9d568a4702a6f9405882db56c2a2aa3189c1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 20 May 2005 16:09:05 -0300 Subject: better use defined/undefined as flag values for macros --- loadlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'loadlib.c') diff --git a/loadlib.c b/loadlib.c index 178be245..4b70054e 100644 --- a/loadlib.c +++ b/loadlib.c @@ -1,5 +1,5 @@ /* -** $Id: loadlib.c,v 1.27 2005/05/16 21:19:00 roberto Exp roberto $ +** $Id: loadlib.c,v 1.28 2005/05/17 19:49:15 roberto Exp roberto $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** @@ -315,7 +315,7 @@ static int loader_Lua (lua_State *L) { const char *name = luaL_checkstring(L, 1); const char *fname = luaL_gsub(L, name, ".", LUA_DIRSEP); const char *path = NULL; -#if LUA_COMPAT_PATH +#if defined(LUA_COMPAT_PATH) /* try first `LUA_PATH' for compatibility */ lua_pushstring(L, "LUA_PATH"); lua_rawget(L, LUA_GLOBALSINDEX); @@ -508,7 +508,7 @@ LUALIB_API int luaopen_loadlib (lua_State *L) { lua_setfield(L, -2, "preload"); /* create `loadlib' function */ lua_pushcfunction(L, ll_loadlib); -#if LUA_COMPAT_LOADLIB +#if defined(LUA_COMPAT_LOADLIB) lua_pushvalue(L, -1); lua_setfield(L, LUA_GLOBALSINDEX, "loadlib"); #endif -- cgit v1.2.3-55-g6feb