There's a macro to get ${^RE_DEBUG_FLAGS} when debugging,
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 19 Apr 2006 09:34:48 +0000 (09:34 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 19 Apr 2006 09:34:48 +0000 (09:34 +0000)
so use it (and this fixes a valgrind memory access error)

p4raw-id: //depot/perl@27899

regcomp.c

index 0e53589d9519730bd03fd254cbf543781c9f2351..ce24f44bded3a2127c18dd23faafeff22e5210ee 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -5994,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;