This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove remaining calls of NATIVE_TO_NEED
authorKarl Williamson <public@khwilliamson.com>
Wed, 20 Feb 2013 17:26:43 +0000 (10:26 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 29 Aug 2013 15:55:53 +0000 (09:55 -0600)
These calls are just copying the input to the output byte by byte.
There is no need to worry about UTF-8 or not, as the output is just an
exact copy of the input

toke.c

diff --git a/toke.c b/toke.c
index 9549183..bab4fbb 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3253,7 +3253,7 @@ S_scan_const(pTHX_ char *start)
        else if (*s == '(' && PL_lex_inpat && s[1] == '?' && !in_charclass) {
            if (s[2] == '#') {
                while (s+1 < send && *s != ')')
-                   *d++ = NATIVE_TO_NEED(has_utf8,*s++);
+                   *d++ = *s++;
            }
            else if (!PL_lex_casemods &&
                     (    s[2] == '{' /* This should match regcomp.c */
@@ -3267,7 +3267,7 @@ S_scan_const(pTHX_ char *start)
        else if (*s == '#' && PL_lex_inpat && !in_charclass &&
          ((PMOP*)PL_lex_inpat)->op_pmflags & RXf_PMf_EXTENDED) {
            while (s+1 < send && *s != '\n')
-               *d++ = NATIVE_TO_NEED(has_utf8,*s++);
+               *d++ = *s++;
        }
 
        /* no further processing of single-quoted regex */
@@ -3808,7 +3808,7 @@ S_scan_const(pTHX_ char *start)
 #endif
        }
        else {
-           *d++ = NATIVE_TO_NEED(has_utf8,*s++);
+           *d++ = *s++;
        }
     } /* while loop to process each character */