summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-04-27 10:26:58 -0600
committerKarl Williamson <khw@cpan.org>2014-05-30 10:24:27 -0600
commit8373491aaf51cff82a66edde8d9909cbb51f03e9 (patch)
tree6bd73f80b478f019e49c8c4d831e5ae3869f7d53 /proto.h
parentdf758df2cf990debef5a719b684d8f2689a0bdcb (diff)
downloadperl-8373491aaf51cff82a66edde8d9909cbb51f03e9.tar.gz
/x in patterns now includes all \p{PatWS}
This brings Perl regular expressions more into conformance with Unicode. /x now accepts 5 additional characters as white space. Use of these characters as literals under /x has been deprecated since 5.18, so now we are free to change what they mean. This commit eliminates the static function that processes the old whitespace definition (and a generated macro that was used only for this), using the already existing one for the new definition. It refactors slightly the static function that skips comments to mesh better with the needs of its callers, and calls it in one place where before the code was essentially duplicated. p5p discussion starting in http://nntp.perl.org/group/perl.perl5.porters/214726 convinced me that the (?[ ]) comments should be terminated the same way as regular /x comments, and this was also done in this commit. No prior notice is necessary as this is an experimental feature.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/proto.h b/proto.h
index a8a0e5a97b..7a71622edf 100644
--- a/proto.h
+++ b/proto.h
@@ -6842,10 +6842,11 @@ STATIC SV * S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags)
#define PERL_ARGS_ASSERT_REG_SCAN_NAME \
assert(pRExC_state)
-STATIC bool S_reg_skipcomment(pTHX_ RExC_state_t *pRExC_state)
- __attribute__nonnull__(pTHX_1);
+PERL_STATIC_INLINE char * S_reg_skipcomment(pTHX_ RExC_state_t *pRExC_state, char * p)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_REG_SKIPCOMMENT \
- assert(pRExC_state)
+ assert(pRExC_state); assert(p)
STATIC regnode* S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg)
__attribute__nonnull__(pTHX_1);
@@ -6876,10 +6877,10 @@ STATIC void S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U
#define PERL_ARGS_ASSERT_REGINSERT \
assert(pRExC_state); assert(opnd)
-STATIC char * S_regpatws(RExC_state_t *pRExC_state, char *p, const bool recognize_comment)
+STATIC char * S_regpatws(pTHX_ RExC_state_t *pRExC_state, char *p, const bool recognize_comment)
__attribute__warn_unused_result__
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_REGPATWS \
assert(pRExC_state); assert(p)
@@ -6907,13 +6908,6 @@ PERL_STATIC_INLINE STRLEN S_reguni(pTHX_ const RExC_state_t *pRExC_state, UV uv,
#define PERL_ARGS_ASSERT_REGUNI \
assert(pRExC_state); assert(s)
-STATIC char * S_regwhite(RExC_state_t *pRExC_state, char *p)
- __attribute__warn_unused_result__
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-#define PERL_ARGS_ASSERT_REGWHITE \
- assert(pRExC_state); assert(p)
-
STATIC void S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, struct scan_data_t *data, SSize_t *minlenp, int is_inf)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)