summaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-19 17:06:52 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-19 17:06:52 -0200
commit062e809e542ec066986c4e3e054f95e1bfc0cb50 (patch)
tree5663d1961cb5253f4261dc3df7d3ac3c9a18f6a1 /lopcodes.h
parentb4c18248247d84a3acffc020b09d1637dd2990c6 (diff)
downloadlua-062e809e542ec066986c4e3e054f95e1bfc0cb50.tar.gz
lua-062e809e542ec066986c4e3e054f95e1bfc0cb50.tar.bz2
lua-062e809e542ec066986c4e3e054f95e1bfc0cb50.zip
new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and
definitions of non-static variables
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 77da09aa..bd8cc082 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.131 2009/09/28 16:32:50 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.132 2009/10/28 12:20:07 roberto Exp roberto $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -270,7 +270,7 @@ enum OpArgMask {
270 OpArgK /* argument is a constant or register/constant */ 270 OpArgK /* argument is a constant or register/constant */
271}; 271};
272 272
273LUAI_DATA const lu_byte luaP_opmodes[NUM_OPCODES]; 273LUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES];
274 274
275#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3)) 275#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3))
276#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3)) 276#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
@@ -279,7 +279,7 @@ LUAI_DATA const lu_byte luaP_opmodes[NUM_OPCODES];
279#define testTMode(m) (luaP_opmodes[m] & (1 << 7)) 279#define testTMode(m) (luaP_opmodes[m] & (1 << 7))
280 280
281 281
282LUAI_DATA const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */ 282LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
283 283
284 284
285/* number of list items to accumulate before a SETLIST instruction */ 285/* number of list items to accumulate before a SETLIST instruction */