diff options
author | David Mitchell <davem@iabyn.com> | 2012-06-22 12:36:03 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-09-08 15:42:06 +0100 |
commit | d3b97530399d61590a1500b52bdba553d657bda5 (patch) | |
tree | 0ad370f9d3c601b62e19d31ef7c20290098ce23d /perl.h | |
parent | 8fd1a95029bf0ff87a3064dec7d6645f40359f2c (diff) | |
download | perl-d3b97530399d61590a1500b52bdba553d657bda5.tar.gz |
PL_sawampersand: use 3 bit flags rather than bool
Set a separate flag for each of $`, $& and $'.
It still works fine in boolean context.
This will allow us to have more refined control over what parts
of a match string to copy (we currently copy the whole string).
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4854,6 +4854,12 @@ typedef enum { #define HINT_SORT_MERGESORT 0x00000002 #define HINT_SORT_STABLE 0x00000100 /* sort styles (currently one) */ +/* flags for PL_sawampersand */ + +#define SAWAMPERSAND_LEFT 1 /* saw $` */ +#define SAWAMPERSAND_MIDDLE 2 /* saw $& */ +#define SAWAMPERSAND_RIGHT 4 /* saw $' */ + /* Various states of the input record separator SV (rs) */ #define RsSNARF(sv) (! SvOK(sv)) #define RsSIMPLE(sv) (SvOK(sv) && (! SvPOK(sv) || SvCUR(sv))) |