diff --git a/numeric.c b/numeric.c index fab4d66e39..c5ac72fef4 100644 --- a/numeric.c +++ b/numeric.c @@ -401,7 +401,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start, const bool allow_underscores = cBOOL(input_flags & ( PERL_SCAN_ALLOW_UNDERSCORES - |PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES)); + |PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY)); const char * s = start; const char * e = start + *len_p; @@ -557,7 +557,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start, * set */ && ( LIKELY(s > s0) || UNLIKELY(! ( input_flags - & PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES)))) + & PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY)))) { ++s; diff --git a/perl.h b/perl.h index c4c8577aed..8707b00ad2 100644 --- a/perl.h +++ b/perl.h @@ -8344,8 +8344,8 @@ EXTERN_C int flock(int fd, int op); /* Don't warn on overflow; output flag still set */ # define PERL_SCAN_SILENT_OVERFLOW 0x80 -/* Forbid a leading underscore, which the other one doesn't */ -# define PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES 0x100 +/* grok_??? accept a stand-alone underscore between digits only in numbers */ +# define PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY 0x100 #endif diff --git a/regcomp.c b/regcomp.c index c6a2e6ee0e..56d3bb7986 100644 --- a/regcomp.c +++ b/regcomp.c @@ -5352,7 +5352,7 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, I32 flags = PERL_SCAN_SILENT_OVERFLOW | PERL_SCAN_SILENT_ILLDIGIT | PERL_SCAN_NOTIFY_ILLDIGIT - | PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES + | PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY | PERL_SCAN_DISALLOW_PREFIX; STRLEN len = e - RExC_parse; NV overflow_value;