diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.25 1998/06/05 22:17:44 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.26 1998/07/12 16:16:02 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -29,9 +29,8 @@ char lua_ident[] = "$Lua: " LUA_VERSION " " LUA_COPYRIGHT " $\n" | |||
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | TObject *luaA_Address (lua_Object o) | 32 | TObject *luaA_Address (lua_Object o) { |
33 | { | 33 | return (o != LUA_NOOBJECT) ? Address(o) : NULL; |
34 | return Address(o); | ||
35 | } | 34 | } |
36 | 35 | ||
37 | 36 | ||
@@ -150,12 +149,12 @@ lua_Object lua_settagmethod (int tag, char *event) | |||
150 | } | 149 | } |
151 | 150 | ||
152 | 151 | ||
153 | lua_Object lua_seterrormethod (void) | 152 | lua_Object lua_seterrormethod (void) { |
154 | { | 153 | lua_Object temp; |
155 | TObject temp = L->errorim; | ||
156 | checkCparams(1); | 154 | checkCparams(1); |
157 | L->errorim = *(--L->stack.top); | 155 | temp = lua_getglobal("_ERRORMESSAGE"); |
158 | return put_luaObject(&temp); | 156 | lua_setglobal("_ERRORMESSAGE"); |
157 | return temp; | ||
159 | } | 158 | } |
160 | 159 | ||
161 | 160 | ||