summaryrefslogtreecommitdiff
path: root/regcomp.pl
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 /regcomp.pl
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 'regcomp.pl')
-rw-r--r--regcomp.pl13
1 files changed, 7 insertions, 6 deletions
diff --git a/regcomp.pl b/regcomp.pl
index 14c2eb7be2..89bbbe0271 100644
--- a/regcomp.pl
+++ b/regcomp.pl
@@ -157,10 +157,15 @@ while (++$ind <= $lastregop) {
print OUT <<EOP;
};
+#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[] = {
EOP
$ind = 0;
@@ -181,12 +186,8 @@ while (++$ind <= $tot) {
print OUT <<EOP;
};
+# endif /* DOINIT */
#endif /* DEBUGGING */
-#else
-#ifdef DEBUGGING
-extern const char * reg_name[];
-#endif
-#endif /* REG_COMP_C */
/* ex: set ro: */
EOP