diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-10-10 14:40:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-10-10 14:40:17 -0300 |
commit | afa0d0ac0df60e37fd9473f50041505246228b35 (patch) | |
tree | 4e1bff8a0be61220148e1443a15899f9be2944a5 /loadlib.c | |
parent | 742b8be0c13b2abd6702c54c5f3ea929c3a9245f (diff) | |
download | lua-afa0d0ac0df60e37fd9473f50041505246228b35.tar.gz lua-afa0d0ac0df60e37fd9473f50041505246228b35.tar.bz2 lua-afa0d0ac0df60e37fd9473f50041505246228b35.zip |
new constant LUA_OK
Diffstat (limited to 'loadlib.c')
-rw-r--r-- | loadlib.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: loadlib.c,v 1.54 2006/07/03 20:16:49 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.55 2006/09/11 14:07:24 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 | ** |
@@ -89,8 +89,6 @@ static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { | |||
89 | ** ======================================================================= | 89 | ** ======================================================================= |
90 | */ | 90 | */ |
91 | 91 | ||
92 | #include <windows.h> | ||
93 | |||
94 | 92 | ||
95 | #undef setprogdir | 93 | #undef setprogdir |
96 | 94 | ||
@@ -382,7 +380,7 @@ static int loader_Lua (lua_State *L) { | |||
382 | const char *name = luaL_checkstring(L, 1); | 380 | const char *name = luaL_checkstring(L, 1); |
383 | filename = findfile(L, name, "path"); | 381 | filename = findfile(L, name, "path"); |
384 | if (filename == NULL) return 1; /* library not found in this path */ | 382 | if (filename == NULL) return 1; /* library not found in this path */ |
385 | if (luaL_loadfile(L, filename) != 0) | 383 | if (luaL_loadfile(L, filename) != LUA_OK) |
386 | loaderror(L, filename); | 384 | loaderror(L, filename); |
387 | return 1; /* library loaded successfully */ | 385 | return 1; /* library loaded successfully */ |
388 | } | 386 | } |