summaryrefslogtreecommitdiff
path: root/regnodes.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-03-03 12:22:19 +0000
committerNicholas Clark <nick@ccl4.org>2007-03-03 12:22:19 +0000
commit13d6edb45df716e9bd8a40bf4d0dcc0834c8e1d8 (patch)
tree5332ce2bea844b2fbdd84bfb242e0e113164be0e /regnodes.h
parent2246ee039f9382f6a88766dc2e05a32de5ee2c3c (diff)
downloadperl-13d6edb45df716e9bd8a40bf4d0dcc0834c8e1d8.tar.gz
Define and initialise reg_name only once.
This allows re to be a static extension. As it's now no-longer a static variable in regcomp.c, it needs a PL_ prefix. p4raw-id: //depot/perl@30451
Diffstat (limited to 'regnodes.h')
-rw-r--r--regnodes.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/regnodes.h b/regnodes.h
index 8727a01392..2f21dd9971 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -452,10 +452,15 @@ static const char reg_off_by_arg[] = {
0, /* PSEUDO */
};
+#endif /* REG_COMP_C */
+
/* reg_name[] - Opcode/state names in string form, for debugging */
#ifdef DEBUGGING
-const char * reg_name[] = {
+# ifndef DOINIT
+EXTCONST char * PL_reg_name[];
+# else
+EXTCONST char * PL_reg_name[] = {
"END", /* 0000 */
"SUCCEED", /* 0x01 */
"BOL", /* 0x02 */
@@ -583,11 +588,7 @@ const char * reg_name[] = {
"KEEPS_next", /* REGNODE_MAX +0x27 */
"KEEPS_next_fail", /* REGNODE_MAX +0x28 */
};
+# endif /* DOINIT */
#endif /* DEBUGGING */
-#else
-#ifdef DEBUGGING
-extern const char * reg_name[];
-#endif
-#endif /* REG_COMP_C */
/* ex: set ro: */