diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-03-03 12:22:19 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-03-03 12:22:19 +0000 |
commit | 13d6edb45df716e9bd8a40bf4d0dcc0834c8e1d8 (patch) | |
tree | 5332ce2bea844b2fbdd84bfb242e0e113164be0e /regnodes.h | |
parent | 2246ee039f9382f6a88766dc2e05a32de5ee2c3c (diff) | |
download | perl-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.h | 13 |
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: */ |