summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-06-22 12:36:03 +0100
committerDavid Mitchell <davem@iabyn.com>2012-09-08 15:42:06 +0100
commitd3b97530399d61590a1500b52bdba553d657bda5 (patch)
tree0ad370f9d3c601b62e19d31ef7c20290098ce23d /perl.h
parent8fd1a95029bf0ff87a3064dec7d6645f40359f2c (diff)
downloadperl-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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 2cc4e91c1a..b299432ec4 100644
--- a/perl.h
+++ b/perl.h
@@ -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)))