summaryrefslogtreecommitdiff
path: root/dquote_static.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-01-07 08:18:54 -0700
committerKarl Williamson <public@khwilliamson.com>2013-01-11 11:50:36 -0700
commit344451ec0ac464dfefc065162e19e505c7aa8c56 (patch)
treef6fad0f921f0f6507022560f537fdef95f895348 /dquote_static.c
parent56de9929c84969b1f18f48c90312eccd086cd2e8 (diff)
downloadperl-344451ec0ac464dfefc065162e19e505c7aa8c56.tar.gz
dquote_static.c: refactor common code to initialization
This flag bit is set in both branches of the code; it might as well be initialized instead.
Diffstat (limited to 'dquote_static.c')
-rw-r--r--dquote_static.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/dquote_static.c b/dquote_static.c
index 9293b7bdb7..f3cade89e4 100644
--- a/dquote_static.c
+++ b/dquote_static.c
@@ -205,11 +205,13 @@ S_grok_bslash_x(pTHX_ char **s, UV *uv, const char** error_msg,
* 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 = 0;
+ I32 flags = PERL_SCAN_DISALLOW_PREFIX;
PERL_ARGS_ASSERT_GROK_BSLASH_X;
@@ -225,7 +227,6 @@ S_grok_bslash_x(pTHX_ char **s, UV *uv, const char** error_msg,
if (**s != '{') {
STRLEN len = (strict) ? 3 : 2;
- flags |= PERL_SCAN_DISALLOW_PREFIX;
*uv = grok_hex(*s, &len, &flags, NULL);
*s += len;
if (strict && len != 2) {
@@ -266,7 +267,7 @@ S_grok_bslash_x(pTHX_ char **s, UV *uv, const char** error_msg,
return TRUE;
}
- flags |= PERL_SCAN_ALLOW_UNDERSCORES|PERL_SCAN_DISALLOW_PREFIX;
+ flags |= PERL_SCAN_ALLOW_UNDERSCORES;
*uv = grok_hex(*s, &numbers_len, &flags, NULL);
/* Note that if has non-hex, will ignore everything starting with that up