diff options
author | David Mitchell <davem@iabyn.com> | 2013-05-31 21:39:01 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2013-06-02 22:28:54 +0100 |
commit | f65e70f560c80556143956eb9980619a9dfbe2f4 (patch) | |
tree | d9c327235913d5c127fe44da874c403a668b4022 /embedvar.h | |
parent | 1cb95af747617861d08c1213f05d8f1e4b55f942 (diff) | |
download | perl-f65e70f560c80556143956eb9980619a9dfbe2f4.tar.gz |
make PL_reg_curpm global
Currently PL_reg_curpm is actually #deffed to a field within PL_reg_state;
promote it into a fully autonomous perl-interpreter variable.
PL_reg_curpm points to a fake PMOP that's used to temporarily point
PL_curpm to, that we can hang the current regex off, so that this works:
"a" =~ /^(.)(?{ print $1 })/ # prints 'a'
It turns out that it doesn't need to be saved and restored when we
recursively enter the regex engine; that is already handled by saving and
restoring which regex is currently attached to PL_reg_curpm.
So we just need a single global (per interpreter) placeholder.
Since we're shortly going to get rid of PL_reg_state, we need to move it
out of that struct.
Diffstat (limited to 'embedvar.h')
-rw-r--r-- | embedvar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/embedvar.h b/embedvar.h index e689c5e4fb..ee41546a37 100644 --- a/embedvar.h +++ b/embedvar.h @@ -245,6 +245,7 @@ #define PL_ptr_table (vTHX->Iptr_table) #define PL_reentrant_buffer (vTHX->Ireentrant_buffer) #define PL_reentrant_retint (vTHX->Ireentrant_retint) +#define PL_reg_curpm (vTHX->Ireg_curpm) #define PL_reg_state (vTHX->Ireg_state) #define PL_regdummy (vTHX->Iregdummy) #define PL_regex_pad (vTHX->Iregex_pad) |