summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-01-22 23:35:56 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2003-02-02 16:48:26 +0000
commita30b2f1f43446bf5477e7baa5fee5d5c59659ce6 (patch)
treef119415cdab16fe15be9b51e64fce8e428881183 /regexp.h
parentec3916884f8b516a101ac0b622cd88ae38c1b49d (diff)
downloadperl-a30b2f1f43446bf5477e7baa5fee5d5c59659ce6.tar.gz
[perl #18232] [PATCH] store PL_reg_match_utf8 in reganch
Message-Id: <20030122223556.57d597a3.rgarciasuarez@free.fr> p4raw-id: //depot/perl@18633
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/regexp.h b/regexp.h
index 81552baf6c..05640548b1 100644
--- a/regexp.h
+++ b/regexp.h
@@ -71,6 +71,7 @@ typedef struct regexp {
#define ROPT_NAUGHTY 0x20000 /* how exponential is this pattern? */
#define ROPT_COPY_DONE 0x40000 /* subbeg is a copy of the string */
#define ROPT_TAINTED_SEEN 0x80000
+#define ROPT_MATCH_UTF8 0x10000000 /* subbeg is utf-8 */
#define RE_USE_INTUIT_NOML 0x0100000 /* Best to intuit before matching */
#define RE_USE_INTUIT_ML 0x0200000
@@ -99,6 +100,13 @@ typedef struct regexp {
? RX_MATCH_COPIED_on(prog) \
: RX_MATCH_COPIED_off(prog))
+#define RX_MATCH_UTF8(prog) ((prog)->reganch & ROPT_MATCH_UTF8)
+#define RX_MATCH_UTF8_on(prog) ((prog)->reganch |= ROPT_MATCH_UTF8)
+#define RX_MATCH_UTF8_off(prog) ((prog)->reganch &= ~ROPT_MATCH_UTF8)
+#define RX_MATCH_UTF8_set(prog, t) ((t) \
+ ? (RX_MATCH_UTF8_on(prog), (PL_reg_match_utf8 = 1)) \
+ : (RX_MATCH_UTF8_off(prog), (PL_reg_match_utf8 = 0)))
+
#define REXEC_COPY_STR 0x01 /* Need to copy the string. */
#define REXEC_CHECKED 0x02 /* check_substr already checked. */
#define REXEC_SCREAM 0x04 /* use scream table. */