From 13f27704e67ca16eefc14851c1cbf02be39509c6 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 17 Sep 2014 12:16:12 -0600 Subject: Up regex flags limit for (??{}) Previously the regex pattern compilation flags needed for this construct would fit into an 8-bit byte. This conveniently fits into the flags structure element of a regnode. There are changes coming that require more than 8 bits, so in preparation, this commit adds an argument to the node that implements (??{}) (31-bits usable for flags), and moves the storage to that. --- op_reg_common.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'op_reg_common.h') diff --git a/op_reg_common.h b/op_reg_common.h index 9dcdaaec63..108589ee60 100644 --- a/op_reg_common.h +++ b/op_reg_common.h @@ -98,8 +98,11 @@ get_regex_charset(const U32 flags) #define RXf_PMf_COMPILETIME (RXf_PMf_MULTILINE|RXf_PMf_SINGLELINE|RXf_PMf_FOLD|RXf_PMf_EXTENDED|RXf_PMf_KEEPCOPY|RXf_PMf_CHARSET) #define RXf_PMf_FLAGCOPYMASK (RXf_PMf_MULTILINE|RXf_PMf_SINGLELINE|RXf_PMf_FOLD|RXf_PMf_EXTENDED|RXf_PMf_KEEPCOPY|RXf_PMf_CHARSET|RXf_PMf_SPLIT) -#if RXf_PMf_COMPILETIME > 255 -# error RXf_PMf_COMPILETIME wont fit in U8 flags field of eval node + /* Exclude win32 because it can't cope with I32_MAX definition */ +#ifndef WIN32 +# if RXf_PMf_COMPILETIME > I32_MAX +# error RXf_PMf_COMPILETIME wont fit in arg2 field of eval node +# endif #endif /* These copies need to be numerical or defsubs_h.PL won't know about them. */ -- cgit v1.2.1