diff --git a/fallback.c b/fallback.c index f99fe63d..a41712cc 100644 --- a/fallback.c +++ b/fallback.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_fallback="$Id: fallback.c,v 1.6 1994/11/16 17:38:08 roberto Exp roberto $"; +char *rcs_fallback="$Id: fallback.c,v 1.7 1994/11/18 19:46:21 roberto Exp roberto $"; #include @@ -33,7 +33,6 @@ struct FB luaI_fallBacks[] = { {"arith", {LUA_T_CFUNCTION, arithFB}}, {"order", {LUA_T_CFUNCTION, orderFB}}, {"concat", {LUA_T_CFUNCTION, concatFB}}, -{"unminus", {LUA_T_CFUNCTION, arithFB}}, {"settable", {LUA_T_CFUNCTION, gettableFB}}, {"gc", {LUA_T_CFUNCTION, GDFB}} }; diff --git a/fallback.h b/fallback.h index d447ce04..33c22b0d 100644 --- a/fallback.h +++ b/fallback.h @@ -1,5 +1,5 @@ /* -** $Id: fallback.h,v 1.4 1994/11/10 17:36:54 roberto Exp roberto $ +** $Id: fallback.h,v 1.5 1994/11/18 19:46:21 roberto Exp roberto $ */ #ifndef fallback_h @@ -18,9 +18,8 @@ extern struct FB { #define FB_ARITH 3 #define FB_ORDER 4 #define FB_CONCAT 5 -#define FB_UNMINUS 6 -#define FB_SETTABLE 7 -#define FB_GC 8 +#define FB_SETTABLE 6 +#define FB_GC 7 void luaI_setfallback (void); int luaI_lock (Object *object); diff --git a/opcode.c b/opcode.c index d1869654..55a41ee1 100644 --- a/opcode.c +++ b/opcode.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_opcode="$Id: opcode.c,v 3.17 1994/11/17 21:23:43 roberto Exp roberto $"; +char *rcs_opcode="$Id: opcode.c,v 3.18 1994/11/18 19:46:21 roberto Exp roberto $"; #include #include @@ -989,7 +989,10 @@ static int lua_execute (Byte *pc, int base) case MINUSOP: if (tonumber(top-1)) - do_call(&luaI_fallBacks[FB_UNMINUS].function, (top-stack)-1, 1, (top-stack)-1); + { + tag(top++) = LUA_T_NIL; + call_arith("unm"); + } else nvalue(top-1) = - nvalue(top-1); break;