From afa0d0ac0df60e37fd9473f50041505246228b35 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 10 Oct 2006 14:40:17 -0300 Subject: new constant LUA_OK --- loadlib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'loadlib.c') diff --git a/loadlib.c b/loadlib.c index 36778891..98d60008 100644 --- a/loadlib.c +++ b/loadlib.c @@ -1,5 +1,5 @@ /* -** $Id: loadlib.c,v 1.54 2006/07/03 20:16:49 roberto Exp roberto $ +** $Id: loadlib.c,v 1.55 2006/09/11 14:07:24 roberto Exp roberto $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** @@ -89,8 +89,6 @@ static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { ** ======================================================================= */ -#include - #undef setprogdir @@ -382,7 +380,7 @@ static int loader_Lua (lua_State *L) { const char *name = luaL_checkstring(L, 1); filename = findfile(L, name, "path"); if (filename == NULL) return 1; /* library not found in this path */ - if (luaL_loadfile(L, filename) != 0) + if (luaL_loadfile(L, filename) != LUA_OK) loaderror(L, filename); return 1; /* library loaded successfully */ } -- cgit v1.2.3-55-g6feb