aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-06-16 16:48:18 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-06-16 16:48:18 -0300
commit4d2de484f653fe46ac97fcb7e02f3cc7762cd962 (patch)
treed406637e53935cb87239ddc4531147e12a4732b0
parent312f78d9258376473bc21079518db6942f7ff939 (diff)
downloadlua-4d2de484f653fe46ac97fcb7e02f3cc7762cd962.tar.gz
lua-4d2de484f653fe46ac97fcb7e02f3cc7762cd962.tar.bz2
lua-4d2de484f653fe46ac97fcb7e02f3cc7762cd962.zip
"lua_seterrormethod" should return the previous handler.
-rw-r--r--lua.h4
-rw-r--r--opcode.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/lua.h b/lua.h
index e255045b..daa06f55 100644
--- a/lua.h
+++ b/lua.h
@@ -2,7 +2,7 @@
2** LUA - An Extensible Extension Language 2** LUA - An Extensible Extension Language
3** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 3** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
4** e-mail: lua@tecgraf.puc-rio.br 4** e-mail: lua@tecgraf.puc-rio.br
5** $Id: lua.h,v 4.6 1997/06/09 17:28:14 roberto Exp roberto $ 5** $Id: lua.h,v 4.7 1997/06/12 18:27:29 roberto Exp roberto $
6*/ 6*/
7 7
8 8
@@ -23,7 +23,7 @@ typedef unsigned int lua_Object;
23 23
24lua_Object lua_settagmethod (int tag, char *event, lua_CFunction method); 24lua_Object lua_settagmethod (int tag, char *event, lua_CFunction method);
25lua_Object lua_gettagmethod (int tag, char *event); 25lua_Object lua_gettagmethod (int tag, char *event);
26void lua_seterrormethod (lua_CFunction method); 26lua_Object lua_seterrormethod (lua_CFunction method);
27 27
28int lua_newtag (void); 28int lua_newtag (void);
29void lua_settag (int tag); /* In: object */ 29void lua_settag (int tag); /* In: object */
diff --git a/opcode.c b/opcode.c
index 101819dc..8df64cae 100644
--- a/opcode.c
+++ b/opcode.c
@@ -3,7 +3,7 @@
3** TecCGraf - PUC-Rio 3** TecCGraf - PUC-Rio
4*/ 4*/
5 5
6char *rcs_opcode="$Id: opcode.c,v 4.9 1997/06/16 16:50:22 roberto Exp roberto $"; 6char *rcs_opcode="$Id: opcode.c,v 4.10 1997/06/16 18:42:32 roberto Exp roberto $";
7 7
8#include <setjmp.h> 8#include <setjmp.h>
9#include <stdio.h> 9#include <stdio.h>
@@ -667,10 +667,11 @@ lua_Object lua_settagmethod (int tag, char *event, lua_CFunction method)
667 return put_luaObjectonTop(); 667 return put_luaObjectonTop();
668} 668}
669 669
670void lua_seterrormethod (lua_CFunction method) 670lua_Object lua_seterrormethod (lua_CFunction method)
671{ 671{
672 lua_pushcfunction(method); 672 lua_pushcfunction(method);
673 do_unprotectedrun(luaI_seterrormethod, 1, 0); 673 do_unprotectedrun(luaI_seterrormethod, 1, 1);
674 return put_luaObjectonTop();
674} 675}
675 676
676 677