Skip to content

Commit 26eb144

Browse files
committed
no need to define 'luaP_opnames' in regular builds
1 parent f9c3d6f commit 26eb144

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

lopcodes.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
** $Id: lopcodes.c,v 1.80 2018/03/07 15:55:38 roberto Exp roberto $
2+
** $Id: lopcodes.c,v 1.81 2018/04/04 14:23:41 roberto Exp roberto $
33
** Opcodes for Lua virtual machine
44
** See Copyright Notice in lua.h
55
*/
@@ -17,6 +17,8 @@
1717

1818
/* ORDER OP */
1919

20+
#if defined(LUAI_DEFOPNAMES)
21+
2022
LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
2123
"MOVE",
2224
"LOADI",
@@ -98,6 +100,8 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
98100
NULL
99101
};
100102

103+
#endif
104+
101105

102106
LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
103107
/* OT IT T A mode opcode */

ltests.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
** $Id: ltests.h,v 2.56 2018/02/27 18:47:32 roberto Exp roberto $
2+
** $Id: ltests.h,v 2.57 2018/04/11 16:49:36 roberto Exp roberto $
33
** Internal Header for Debugging of the Lua Implementation
44
** See Copyright Notice in lua.h
55
*/
@@ -24,6 +24,10 @@
2424
#define lua_assert(c) assert(c)
2525

2626

27+
/* include opcode names */
28+
#define LUAI_DEFOPNAMES
29+
30+
2731
/* compiled with -O0, Lua uses a lot of C stack space... */
2832
#undef LUAI_MAXCCALLS
2933
#define LUAI_MAXCCALLS 200

0 commit comments

Comments
 (0)