summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-12-29 16:56:34 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-12-29 16:56:34 -0200
commite22cdf7752bc4d19cc9dbfad8148e9ee90ee3524 (patch)
tree78acdba5e1edf75119fa3ada0d9e36e7afabde3b
parenta5eb48a3e69871eb3ed7df5fc09ae6bfea75fbd3 (diff)
downloadlua-e22cdf7752bc4d19cc9dbfad8148e9ee90ee3524.tar.gz
lua-e22cdf7752bc4d19cc9dbfad8148e9ee90ee3524.tar.bz2
lua-e22cdf7752bc4d19cc9dbfad8148e9ee90ee3524.zip
better error messages when require fails for C module
-rw-r--r--loadlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loadlib.c b/loadlib.c
index a74b6a9c..b083835b 100644
--- a/loadlib.c
+++ b/loadlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loadlib.c,v 1.13 2004/12/22 17:43:27 roberto Exp roberto $ 2** $Id: loadlib.c,v 1.14 2004/12/27 15:58: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*
@@ -325,7 +325,7 @@ static const char *loadC (lua_State *L, const char *fname, const char *name) {
325 funcname = luaL_gsub(L, name, ".", LUA_OFSEP); 325 funcname = luaL_gsub(L, name, ".", LUA_OFSEP);
326 funcname = lua_pushfstring(L, "%s%s", POF, funcname); 326 funcname = lua_pushfstring(L, "%s%s", POF, funcname);
327 if (ll_loadfunc(L, fname, funcname) != 1) 327 if (ll_loadfunc(L, fname, funcname) != 1)
328 luaL_error(L, "error loading package `%s' (%s)", name, lua_tostring(L, -1)); 328 luaL_error(L, "error loading package `%s' (%s)", name, lua_tostring(L, -2));
329 return NULL; /* library loaded successfully */ 329 return NULL; /* library loaded successfully */
330} 330}
331 331