avoid some warnings from strange compilers

This commit is contained in:
Roberto Ierusalimschy 2001-08-27 12:14:57 -03:00
parent 022bf27202
commit 7afc74ff07
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id:$
** $Id: lopcodes.c,v 1.2 2001/07/03 17:02:02 roberto Exp roberto $
** extracted automatically from lopcodes.h by mkprint.lua
** DO NOT EDIT
** See Copyright Notice in lua.h
@ -62,7 +62,7 @@ const l_char *const luaP_opnames[] = {
((b)<<OpModeBreg) | ((c)<<OpModeCreg) | \
((sa)<<OpModesetA) | ((k)<<OpModeK) | (m))
const lu_byte luaP_opmodes[] = {
const lu_byte luaP_opmodes[NUM_OPCODES] = {
/* T _ B C sA K mode opcode */
opmode(0,0,1,0, 1,0,iABC) /* OP_MOVE */
,opmode(0,0,0,0, 1,1,iABc) /* OP_LOADK */

View File

@ -1,5 +1,5 @@
/*
** $Id: lopcodes.h,v 1.77 2001/07/03 17:01:34 roberto Exp roberto $
** $Id: lopcodes.h,v 1.78 2001/07/24 17:19:07 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -213,7 +213,7 @@ enum OpModeMask {
OpModeT /* operator is a test */
};
extern const lu_byte luaP_opmodes[];
extern const lu_byte luaP_opmodes[NUM_OPCODES];
#define getOpMode(m) ((enum OpMode)(luaP_opmodes[m] & 3))
#define testOpMode(m, b) (luaP_opmodes[m] & (1 << (b)))