diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-08-06 10:38:32 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-08-06 10:38:32 -0300 |
| commit | afe849c9b45e00f2bd31606aad3d2bb7a38ef5d2 (patch) | |
| tree | 8fdff8c575f57fda8d77c0134bd198f0604c082b | |
| parent | ccd678ea3ed3b43b7f62fa9c734e2ec086d1e086 (diff) | |
| download | lua-afe849c9b45e00f2bd31606aad3d2bb7a38ef5d2.tar.gz lua-afe849c9b45e00f2bd31606aad3d2bb7a38ef5d2.tar.bz2 lua-afe849c9b45e00f2bd31606aad3d2bb7a38ef5d2.zip | |
change in error message
| -rw-r--r-- | loadlib.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: loadlib.c,v 1.59 2007/12/12 14:36:12 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.60 2008/08/05 19:25:42 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 | ** |
| @@ -524,8 +524,7 @@ static void setfenv (lua_State *L) { | |||
| 524 | if (lua_getstack(L, 1, &ar) == 0 || | 524 | if (lua_getstack(L, 1, &ar) == 0 || |
| 525 | lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ | 525 | lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ |
| 526 | lua_iscfunction(L, -1)) | 526 | lua_iscfunction(L, -1)) |
| 527 | luaL_error(L, "function " LUA_QL("module") | 527 | luaL_error(L, LUA_QL("module") " not called from a Lua function"); |
| 528 | " not called from a Lua function"); | ||
| 529 | lua_pushvalue(L, -2); /* copy new environment table to top */ | 528 | lua_pushvalue(L, -2); /* copy new environment table to top */ |
| 530 | lua_setfenv(L, -2); | 529 | lua_setfenv(L, -2); |
| 531 | lua_pop(L, 1); /* remove function */ | 530 | lua_pop(L, 1); /* remove function */ |
