Skip to content

Commit 5b88501

Browse files
committed
grok_bin_oct_hex: Change name of internal flag
This clarifies its meaning
1 parent 6fa95f2 commit 5b88501

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

numeric.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
401401

402402
const bool allow_underscores =
403403
cBOOL(input_flags & ( PERL_SCAN_ALLOW_UNDERSCORES
404-
|PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES));
404+
|PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY));
405405
const char * s = start;
406406
const char * e = start + *len_p;
407407

@@ -557,7 +557,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
557557
* set */
558558
&& ( LIKELY(s > s0)
559559
|| UNLIKELY(! ( input_flags
560-
& PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES))))
560+
& PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY))))
561561
{
562562
++s;
563563

perl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8344,8 +8344,8 @@ EXTERN_C int flock(int fd, int op);
83448344
/* Don't warn on overflow; output flag still set */
83458345
# define PERL_SCAN_SILENT_OVERFLOW 0x80
83468346

8347-
/* Forbid a leading underscore, which the other one doesn't */
8348-
# define PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES 0x100
8347+
/* grok_??? accept a stand-alone underscore between digits only in numbers */
8348+
# define PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY 0x100
83498349

83508350
#endif
83518351

regcomp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5352,7 +5352,7 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state,
53525352
I32 flags = PERL_SCAN_SILENT_OVERFLOW
53535353
| PERL_SCAN_SILENT_ILLDIGIT
53545354
| PERL_SCAN_NOTIFY_ILLDIGIT
5355-
| PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES
5355+
| PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES_ONLY
53565356
| PERL_SCAN_DISALLOW_PREFIX;
53575357
STRLEN len = e - RExC_parse;
53585358
NV overflow_value;

0 commit comments

Comments
 (0)