mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
"lua_seterrormethod" should return the previous handler.
This commit is contained in:
parent
312f78d925
commit
4d2de484f6
2 changed files with 6 additions and 5 deletions
7
opcode.c
7
opcode.c
|
|
@ -3,7 +3,7 @@
|
|||
** TecCGraf - PUC-Rio
|
||||
*/
|
||||
|
||||
char *rcs_opcode="$Id: opcode.c,v 4.9 1997/06/16 16:50:22 roberto Exp roberto $";
|
||||
char *rcs_opcode="$Id: opcode.c,v 4.10 1997/06/16 18:42:32 roberto Exp roberto $";
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -667,10 +667,11 @@ lua_Object lua_settagmethod (int tag, char *event, lua_CFunction method)
|
|||
return put_luaObjectonTop();
|
||||
}
|
||||
|
||||
void lua_seterrormethod (lua_CFunction method)
|
||||
lua_Object lua_seterrormethod (lua_CFunction method)
|
||||
{
|
||||
lua_pushcfunction(method);
|
||||
do_unprotectedrun(luaI_seterrormethod, 1, 0);
|
||||
do_unprotectedrun(luaI_seterrormethod, 1, 1);
|
||||
return put_luaObjectonTop();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue