diff options
-rw-r--r-- | opcode.c | 10 |
1 files changed, 5 insertions, 5 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 3.92 1997/04/02 22:52:42 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.93 1997/04/02 23:04:12 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -412,9 +412,9 @@ static void getglobal (Word n) | |||
412 | */ | 412 | */ |
413 | void lua_travstack (int (*fn)(TObject *)) | 413 | void lua_travstack (int (*fn)(TObject *)) |
414 | { | 414 | { |
415 | TObject *o; | 415 | StkId i; |
416 | for (o = top-1; o >= stack; o--) | 416 | for (i = (top-1)-stack; i>=0; i--) |
417 | fn (o); | 417 | fn (stack+i); |
418 | } | 418 | } |
419 | 419 | ||
420 | 420 | ||
@@ -671,7 +671,7 @@ void lua_setintmethod (int tag, char *event, lua_CFunction method) | |||
671 | lua_pushcfunction (method); | 671 | lua_pushcfunction (method); |
672 | else | 672 | else |
673 | lua_pushnil(); | 673 | lua_pushnil(); |
674 | do_unprotectedrun(luaI_setintmethod, 3, 0); | 674 | do_unprotectedrun(luaI_setintmethod, 3, 1); |
675 | } | 675 | } |
676 | 676 | ||
677 | void lua_seterrormethod (lua_CFunction method) | 677 | void lua_seterrormethod (lua_CFunction method) |