diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-06-16 16:48:18 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-06-16 16:48:18 -0300 |
| commit | 4d2de484f653fe46ac97fcb7e02f3cc7762cd962 (patch) | |
| tree | d406637e53935cb87239ddc4531147e12a4732b0 | |
| parent | 312f78d9258376473bc21079518db6942f7ff939 (diff) | |
| download | lua-4d2de484f653fe46ac97fcb7e02f3cc7762cd962.tar.gz lua-4d2de484f653fe46ac97fcb7e02f3cc7762cd962.tar.bz2 lua-4d2de484f653fe46ac97fcb7e02f3cc7762cd962.zip | |
"lua_seterrormethod" should return the previous handler.
Diffstat (limited to '')
| -rw-r--r-- | lua.h | 4 | ||||
| -rw-r--r-- | opcode.c | 7 |
2 files changed, 6 insertions, 5 deletions
| @@ -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 | ||
| 24 | lua_Object lua_settagmethod (int tag, char *event, lua_CFunction method); | 24 | lua_Object lua_settagmethod (int tag, char *event, lua_CFunction method); |
| 25 | lua_Object lua_gettagmethod (int tag, char *event); | 25 | lua_Object lua_gettagmethod (int tag, char *event); |
| 26 | void lua_seterrormethod (lua_CFunction method); | 26 | lua_Object lua_seterrormethod (lua_CFunction method); |
| 27 | 27 | ||
| 28 | int lua_newtag (void); | 28 | int lua_newtag (void); |
| 29 | void lua_settag (int tag); /* In: object */ | 29 | void lua_settag (int tag); /* In: object */ |
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 4.9 1997/06/16 16:50:22 roberto Exp roberto $"; | 6 | char *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 | ||
| 670 | void lua_seterrormethod (lua_CFunction method) | 670 | lua_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 | ||
