Remove the enable_debugging member from the structure, and instead
[p5sagit/p5-mst-13.2.git] / regcomp.c
index d2e99a1..8fb49d0 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -48,9 +48,6 @@
 #  define Perl_pregfree my_regfree
 #  define Perl_re_intuit_string my_re_intuit_string
 /* *These* symbols are masked to allow static link. */
-#  define Perl_regnext my_regnext
-#  define Perl_save_re_context my_save_re_context
-#  define Perl_reginitcolors my_reginitcolors
 
 #  define PERL_NO_GET_CONTEXT
 #endif
@@ -1733,8 +1730,6 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap,
                }
                if (code == IFTHEN && num < 2) /* Empty ELSE branch */
                    min1 = 0;
-               if ((flags & (SCF_DO_SUBSTR | SCF_DO_STCLASS)) && !data)
-                   Perl_croak(aTHX_ "panic: null data in study_chunk");
                if (flags & SCF_DO_SUBSTR) {
                    data->pos_min += min1;
                    data->pos_delta += max1 - min1;
@@ -2755,6 +2750,7 @@ S_add_data(RExC_state_t *pRExC_state, I32 n, const char *s)
     return RExC_rx->data->count - n;
 }
 
+#ifndef PERL_IN_XSUB_RE
 void
 Perl_reginitcolors(pTHX)
 {
@@ -2780,7 +2776,7 @@ Perl_reginitcolors(pTHX)
     }
     PL_colorset = 1;
 }
-
+#endif
 
 /*
  - pregcomp - compile a regular expression into internal code
@@ -5996,9 +5992,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;
@@ -6109,6 +6104,7 @@ Perl_pregfree(pTHX_ struct regexp *r)
     Safefree(r);
 }
 
+#ifndef PERL_IN_XSUB_RE
 /*
  - regnext - dig the "next" pointer out of a node
  */
@@ -6127,6 +6123,7 @@ Perl_regnext(pTHX_ register regnode *p)
 
     return(p+offset);
 }
+#endif
 
 STATIC void    
 S_re_croak2(pTHX_ const char* pat1,const char* pat2,...)
@@ -6164,6 +6161,7 @@ S_re_croak2(pTHX_ const char* pat1,const char* pat2,...)
 
 /* XXX Here's a total kludge.  But we need to re-enter for swash routines. */
 
+#ifndef PERL_IN_XSUB_RE
 void
 Perl_save_re_context(pTHX)
 {
@@ -6212,6 +6210,7 @@ Perl_save_re_context(pTHX)
        }
     }
 }
+#endif
 
 static void
 clear_re(pTHX_ void *r)