From f51775950737eb4d097cda0bba143973b5385947 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 21 Jun 2000 14:05:49 -0300
Subject: details

---
 lcode.c    | 4 ++--
 lopcodes.h | 3 ++-
 ltests.c   | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lcode.c b/lcode.c
index e2a8dc94..6e43f499 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lcode.c,v 1.35 2000/06/12 13:52:05 roberto Exp roberto $
+** $Id: lcode.c,v 1.36 2000/06/16 17:51:40 roberto Exp roberto $
 ** Code generator for Lua
 ** See Copyright Notice in lua.h
 */
@@ -632,7 +632,7 @@ int luaK_code2 (FuncState *fs, OpCode o, int arg1, int arg2) {
 }
 
 
-const struct OpProperties luaK_opproperties[OP_SETLINE+1] = {
+const struct OpProperties luaK_opproperties[NUM_OPCODES] = {
   {iO, 0},	/* OP_END */
   {iU, 0},	/* OP_RETURN */
   {iAB, 0},	/* OP_CALL */
diff --git a/lopcodes.h b/lopcodes.h
index 6fd583a8..f98f562b 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
 /*
-** $Id: lopcodes.h,v 1.62 2000/05/22 18:44:46 roberto Exp roberto $
+** $Id: lopcodes.h,v 1.63 2000/06/05 14:56:18 roberto Exp roberto $
 ** Opcodes for Lua virtual machine
 ** See Copyright Notice in lua.h
 */
@@ -152,6 +152,7 @@ OP_SETLINE/*	U	-		-		LINE=u		*/
 
 } OpCode;
 
+#define NUM_OPCODES	((int)OP_SETLINE+1)
 
 
 #define ISJUMP(o)	(OP_JMPNE <= (o) && (o) <= OP_JMP)
diff --git a/ltests.c b/ltests.c
index 4a071fae..dd247b5b 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
 /*
-** $Id: ltests.c,v 1.24 2000/06/08 17:48:31 roberto Exp roberto $
+** $Id: ltests.c,v 1.25 2000/06/12 13:52:05 roberto Exp roberto $
 ** Internal Module for Debugging of the Lua Implementation
 ** See Copyright Notice in lua.h
 */
@@ -50,7 +50,7 @@ static void setnameval (lua_Object t, const char *name, int val) {
 */
 
 
-static const char *const instrname[OP_SETLINE+1] = {
+static const char *const instrname[NUM_OPCODES] = {
   "END", "RETURN", "CALL", "TAILCALL", "PUSHNIL", "POP", "PUSHINT", 
   "PUSHSTRING", "PUSHNUM", "PUSHNEGNUM", "PUSHUPVALUE", "GETLOCAL", 
   "GETGLOBAL", "GETTABLE", "GETDOTTED", "GETINDEXED", "PUSHSELF", 
-- 
cgit v1.2.3-55-g6feb