summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-20 08:12:15 -0700
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:55:53 -0600
commit4d73d076a1f9b4c3e28db697afccd61d5632c4c3 (patch)
treecb69f311a3295eb1e72bde3abd5a001af7fe28bf /toke.c
parentc286a9a6b461daa82e01cd6e7f5720be814c2505 (diff)
downloadperl-4d73d076a1f9b4c3e28db697afccd61d5632c4c3.tar.gz
toke.c: Remove some NATIVE_TO_NEED calls
I believe NATIVE_TO_NEED is defective, and will remove it in a future commit. But, just in case I'm wrong, I'm doing it in small steps so bisects will show the culprit. This removes the calls to it where the parameter is clearly invariant under UTF-8 and UTF-EBCDIC, and so the result can't be other than just the parameter.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/toke.c b/toke.c
index 45e3fd96d4..9549183c5c 100644
--- a/toke.c
+++ b/toke.c
@@ -3163,11 +3163,11 @@ S_scan_const(pTHX_ char *start)
if (isLOWER_A(min)) {
for (i = min; i <= max; i++)
if (isLOWER_A(i))
- *d++ = NATIVE_TO_NEED(has_utf8,i);
+ *d++ = i;
} else {
for (i = min; i <= max; i++)
if (isUPPER_A(i))
- *d++ = NATIVE_TO_NEED(has_utf8,i);
+ *d++ = i;
}
}
else
@@ -3342,7 +3342,7 @@ S_scan_const(pTHX_ char *start)
|| s[1] != '{'
|| regcurly(s + 1, FALSE)))
{
- *d++ = NATIVE_TO_NEED(has_utf8,'\\');
+ *d++ = '\\';
goto default_action;
}
@@ -3736,25 +3736,25 @@ S_scan_const(pTHX_ char *start)
/* printf-style backslashes, formfeeds, newlines, etc */
case 'b':
- *d++ = NATIVE_TO_NEED(has_utf8,'\b');
+ *d++ = '\b';
break;
case 'n':
- *d++ = NATIVE_TO_NEED(has_utf8,'\n');
+ *d++ = '\n';
break;
case 'r':
- *d++ = NATIVE_TO_NEED(has_utf8,'\r');
+ *d++ = '\r';
break;
case 'f':
- *d++ = NATIVE_TO_NEED(has_utf8,'\f');
+ *d++ = '\f';
break;
case 't':
- *d++ = NATIVE_TO_NEED(has_utf8,'\t');
+ *d++ = '\t';
break;
case 'e':
- *d++ = ASCII_TO_NEED(has_utf8,'\033');
+ *d++ = ASCII_TO_NATIVE('\033');
break;
case 'a':
- *d++ = NATIVE_TO_NEED(has_utf8,'\a');
+ *d++ = '\a';
break;
} /* end switch */