This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use constant now defined for ESC
authorKarl Williamson <khw@cpan.org>
Fri, 1 Aug 2014 15:46:12 +0000 (09:46 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 21 Aug 2014 19:12:26 +0000 (13:12 -0600)
This avoids a runtime translation

regcomp.c
toke.c

index 991d2f8..96fa3aa 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -11887,7 +11887,7 @@ tryagain:
                        p++;
                        break;
                    case 'e':
-                         ender = ASCII_TO_NATIVE('\033');
+                       ender = ESC_NATIVE;
                        p++;
                        break;
                    case 'a':
@@ -13705,7 +13705,7 @@ parseit:
            case 't':   value = '\t';                   break;
            case 'f':   value = '\f';                   break;
            case 'b':   value = '\b';                   break;
-           case 'e':   value = ASCII_TO_NATIVE('\033');break;
+           case 'e':   value = ESC_NATIVE;             break;
            case 'a':   value = '\a';                   break;
            case 'o':
                RExC_parse--;   /* function expects to be pointed at the 'o' */
diff --git a/toke.c b/toke.c
index be4c8a5..d2e9eee 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3496,7 +3496,7 @@ S_scan_const(pTHX_ char *start)
                *d++ = '\t';
                break;
            case 'e':
-               *d++ = ASCII_TO_NATIVE('\033');
+               *d++ = ESC_NATIVE;
                break;
            case 'a':
                *d++ = '\a';