History

Lua 5.1.3-rc1

Lua Team committed 18 years ago

Commit ea97e791 parent 4d388a360 files · +732 −439Browse files

Showing the changes to src/lua.c (1 of 60 files). Show all

Unified · Split

src/lua.c+4−2
@@ -1,5 +1,5 @@
1/*1/*
2** $Id: lua.c,v 1.160 2006/06/02 15:34:00 roberto Exp $2** $Id: lua.c,v 1.160.1.2 2007/12/28 15:32:23 roberto Exp $
3** Lua stand-alone interpreter3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h4** See Copyright Notice in lua.h
5*/5*/
@@ -74,6 +74,8 @@ static int report (lua_State *L, int status) { · 68 unmodified lines
74 74
75 75
76static int traceback (lua_State *L) {76static int traceback (lua_State *L) {
77 if (!lua_isstring(L, 1)) /* 'message' not a string? */
78 return 1; /* keep it intact */
77 lua_getfield(L, LUA_GLOBALSINDEX, "debug");79 lua_getfield(L, LUA_GLOBALSINDEX, "debug");
78 if (!lua_istable(L, -1)) {80 if (!lua_istable(L, -1)) {
79 lua_pop(L, 1);81 lua_pop(L, 1);
@@ -144,7 +146,7 @@ static int dostring (lua_State *L, const char *s, const char *name) { · 64 unmodified lines
144static int dolibrary (lua_State *L, const char *name) {146static int dolibrary (lua_State *L, const char *name) {
145 lua_getglobal(L, "require");147 lua_getglobal(L, "require");
146 lua_pushstring(L, name);148 lua_pushstring(L, name);
147 return report(L, lua_pcall(L, 1, 0, 0));149 return report(L, docall(L, 1, 1));
148}150}
149 151
150 152