This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / regcomp.c
index 6f8bb9f..4d63fd4 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -722,7 +722,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg
                    n = regnext(n);
                }
                else if (stringok) {
-                   int oldl = STR_LEN(scan);
+                   const int oldl = STR_LEN(scan);
                    regnode *nnext = regnext(n);
 
                    if (oldl + STR_LEN(n) > U8_MAX)
@@ -797,7 +797,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg
        /* Follow the next-chain of the current node and optimize
           away all the NOTHINGs from it.  */
        if (OP(scan) != CURLYX) {
-           int max = (reg_off_by_arg[OP(scan)]
+           const int max = (reg_off_by_arg[OP(scan)]
                       ? I32_MAX
                       /* I32 may be smaller than U16 on CRAYs! */
                       : (I32_MAX < U16_MAX ? I32_MAX : U16_MAX));
@@ -920,7 +920,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg
            I32 l = STR_LEN(scan);
            UV uc = *((U8*)STRING(scan));
            if (UTF) {
-               U8 *s = (U8*)STRING(scan);
+               const U8 * const s = (U8*)STRING(scan);
                l = utf8_length(s, s + l);
                uc = utf8_to_uvchr(s, NULL);
            }
@@ -4568,7 +4568,7 @@ S_regoptail(pTHX_ RExC_state_t *pRExC_state, regnode *p, regnode *val)
  - regcurly - a little FSA that accepts {\d+,?\d*}
  */
 STATIC I32
-S_regcurly(pTHX_ register char *s)
+S_regcurly(pTHX_ register const char *s)
 {
     if (*s++ != '{')
        return FALSE;