diff options
Diffstat (limited to 'opcode.c')
-rw-r--r-- | opcode.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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.11 1997/06/16 19:48:18 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 4.12 1997/06/19 17:46:12 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -654,21 +654,21 @@ lua_Object lua_gettagmethod (int tag, char *event) | |||
654 | return put_luaObjectonTop(); | 654 | return put_luaObjectonTop(); |
655 | } | 655 | } |
656 | 656 | ||
657 | lua_Object lua_settagmethod (int tag, char *event, lua_CFunction method) | 657 | lua_Object lua_settagmethod (int tag, char *event) |
658 | { | 658 | { |
659 | TObject newmethod; | ||
660 | checkCparams(1); | ||
661 | newmethod = *(--top); | ||
659 | lua_pushnumber(tag); | 662 | lua_pushnumber(tag); |
660 | lua_pushstring(event); | 663 | lua_pushstring(event); |
661 | if (method) | 664 | *top = newmethod; incr_top; |
662 | lua_pushcfunction (method); | ||
663 | else | ||
664 | lua_pushnil(); | ||
665 | do_unprotectedrun(luaI_settagmethod, 3, 1); | 665 | do_unprotectedrun(luaI_settagmethod, 3, 1); |
666 | return put_luaObjectonTop(); | 666 | return put_luaObjectonTop(); |
667 | } | 667 | } |
668 | 668 | ||
669 | lua_Object lua_seterrormethod (lua_CFunction method) | 669 | lua_Object lua_seterrormethod (void) |
670 | { | 670 | { |
671 | lua_pushcfunction(method); | 671 | checkCparams(1); |
672 | do_unprotectedrun(luaI_seterrormethod, 1, 1); | 672 | do_unprotectedrun(luaI_seterrormethod, 1, 1); |
673 | return put_luaObjectonTop(); | 673 | return put_luaObjectonTop(); |
674 | } | 674 | } |