summaryrefslogtreecommitdiff
path: root/dquote.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-01-12 04:05:59 -0700
committerKarl Williamson <khw@cpan.org>2020-01-23 15:46:56 -0700
commiteb761011ef445316d4cd232c3204dde4641e2a79 (patch)
tree8ad4c52d0251ac7183789e622e9766b376a46c0a /dquote.c
parent8911f9b08690cf19ba7c9b935e2549c03ff4148b (diff)
downloadperl-eb761011ef445316d4cd232c3204dde4641e2a79.tar.gz
Hoist code point portability warnings
Diffstat (limited to 'dquote.c')
-rw-r--r--dquote.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/dquote.c b/dquote.c
index bf5cf902a2..4898b350da 100644
--- a/dquote.c
+++ b/dquote.c
@@ -59,7 +59,6 @@ bool
Perl_grok_bslash_o(pTHX_ char **s, const char * const send, UV *uv,
const char** error_msg,
const bool output_warning, const bool strict,
- const bool silence_non_portable,
const bool UTF)
{
@@ -88,16 +87,13 @@ Perl_grok_bslash_o(pTHX_ char **s, const char * const send, UV *uv,
* them
* strict is true if this should fail instead of warn if there are
* non-octal digits within the braces
- * silence_non_portable is true if to suppress warnings about the code
- * point returned being too large to fit on all platforms.
* UTF is true iff the string *s is encoded in UTF-8.
*/
char* e;
STRLEN numbers_len;
I32 flags = PERL_SCAN_ALLOW_UNDERSCORES
| PERL_SCAN_DISALLOW_PREFIX
- /* XXX Until the message is improved in grok_oct, handle errors
- * ourselves */
+ | PERL_SCAN_SILENT_NON_PORTABLE
| PERL_SCAN_SILENT_ILLDIGIT;
PERL_ARGS_ASSERT_GROK_BSLASH_O;
@@ -130,10 +126,6 @@ Perl_grok_bslash_o(pTHX_ char **s, const char * const send, UV *uv,
return FALSE;
}
- if (silence_non_portable) {
- flags |= PERL_SCAN_SILENT_NON_PORTABLE;
- }
-
*uv = grok_oct(*s, &numbers_len, &flags, NULL);
/* Note that if has non-octal, will ignore everything starting with that up
* to the '}' */
@@ -165,7 +157,6 @@ bool
Perl_grok_bslash_x(pTHX_ char **s, const char * const send, UV *uv,
const char** error_msg,
const bool output_warning, const bool strict,
- const bool silence_non_portable,
const bool UTF)
{
@@ -197,13 +188,12 @@ Perl_grok_bslash_x(pTHX_ char **s, const char * const send, UV *uv,
* fail instead of warn or be silent. For example, it requires
* exactly 2 digits following the \x (when there are no braces).
* 3 digits could be a mistake, so is forbidden in this mode.
- * silence_non_portable is true if to suppress warnings about the code
- * point returned being too large to fit on all platforms.
* UTF is true iff the string *s is encoded in UTF-8.
*/
char* e;
STRLEN numbers_len;
- I32 flags = PERL_SCAN_DISALLOW_PREFIX;
+ I32 flags = PERL_SCAN_DISALLOW_PREFIX
+ | PERL_SCAN_SILENT_NON_PORTABLE;
PERL_ARGS_ASSERT_GROK_BSLASH_X;
@@ -275,9 +265,6 @@ Perl_grok_bslash_x(pTHX_ char **s, const char * const send, UV *uv,
}
flags |= PERL_SCAN_ALLOW_UNDERSCORES;
- if (silence_non_portable) {
- flags |= PERL_SCAN_SILENT_NON_PORTABLE;
- }
*uv = grok_hex(*s, &numbers_len, &flags, NULL);
/* Note that if has non-hex, will ignore everything starting with that up