This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add some (UN)?LIKELY() to UTF8 handling
[perl5.git] / perly.c
diff --git a/perly.c b/perly.c
index d7d9ea3..a7115b3 100644 (file)
--- a/perly.c
+++ b/perly.c
@@ -28,6 +28,7 @@
 #include "EXTERN.h"
 #define PERL_IN_PERLY_C
 #include "perl.h"
+#include "feature.h"
 
 typedef unsigned char yytype_uint8;
 typedef signed char yytype_int8;
@@ -342,9 +343,12 @@ Perl_yyparse (pTHX_ int gramtype)
        parser->yychar = yylex();
 #endif
 
+/* perly.tab is shipped based on an ASCII system; if it were to be regenerated
+ * on a platform that doesn't use ASCII, this translation back would need to be
+ * removed */
 #  ifdef EBCDIC
        if (parser->yychar >= 0 && parser->yychar < 255) {
-           parser->yychar = NATIVE_TO_ASCII(parser->yychar);
+           parser->yychar = NATIVE_TO_LATIN1(parser->yychar);
        }
 #  endif
     }
@@ -430,9 +434,6 @@ Perl_yyparse (pTHX_ int gramtype)
 
     switch (yyn) {
 
-
-#define dep() deprecate("\"do\" to call subroutines")
-
 #ifdef PERL_IN_MADLY_C
 #  define IVAL(i) (i)->tk_lval.ival
 #  define PVAL(p) (p)->tk_lval.pval