Changes to perlfaq8 "How do I find out if I'm running interactively
[p5sagit/p5-mst-13.2.git] / regcomp.c
index 663b343..ce24f44 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -2028,15 +2028,17 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap,
            UV uc = *((U8*)STRING(scan));
 
            /* Search for fixed substrings supports EXACT only. */
-           if (flags & SCF_DO_SUBSTR)
+           if (flags & SCF_DO_SUBSTR) {
+               assert(data);
                scan_commit(pRExC_state, data);
+           }
            if (UTF) {
                const U8 * const s = (U8 *)STRING(scan);
                l = utf8_length(s, s + l);
                uc = utf8_to_uvchr(s, NULL);
            }
            min += l;
-           if (data && (flags & SCF_DO_SUBSTR))
+           if (flags & SCF_DO_SUBSTR)
                data->pos_min += l;
            if (flags & SCF_DO_STCLASS_AND) {
                /* Check whether it is compatible with what we know already! */
@@ -5992,9 +5994,8 @@ Perl_pregfree(pTHX_ struct regexp *r)
     dVAR;
 #ifdef DEBUGGING
     SV * const dsv = PERL_DEBUG_PAD_ZERO(0);
-    SV * const re_debug_flags=get_sv(RE_DEBUG_FLAGS,0);
 #endif
-
+    GET_RE_DEBUG_FLAGS_DECL;
 
     if (!r || (--r->refcnt > 0))
        return;