This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Use mnemonic not numeric constant
authorKarl Williamson <public@khwilliamson.com>
Sun, 27 May 2012 07:04:39 +0000 (01:04 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 2 Aug 2012 15:24:51 +0000 (09:24 -0600)
Future commits will add other uses of this number.

regcomp.c

index d09d89f..9c70872 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -10396,6 +10396,7 @@ tryagain:
            register UV ender;
            register char *p;
            char *s;
            register UV ender;
            register char *p;
            char *s;
+#define MAX_NODE_STRING_SIZE 127
            STRLEN foldlen;
            U8 tmpbuf[UTF8_MAXBYTES_CASE+1], *foldbuf;
             U8 node_type;
            STRLEN foldlen;
            U8 tmpbuf[UTF8_MAXBYTES_CASE+1], *foldbuf;
             U8 node_type;
@@ -10429,7 +10430,7 @@ tryagain:
              * non-final, but it is possible for there not to be any in the
              * entire node. */
            for (len = 0, p = RExC_parse - 1;
              * non-final, but it is possible for there not to be any in the
              * entire node. */
            for (len = 0, p = RExC_parse - 1;
-                len < 127 && p < RExC_end;
+                len < MAX_NODE_STRING_SIZE && p < RExC_end;
                 len++)
            {
                char * const oldp = p;
                 len++)
            {
                char * const oldp = p;