Adjust test count for non-windows machines
[p5sagit/p5-mst-13.2.git] / regcomp.c
index 796d8fe..97e81bc 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -5,9 +5,14 @@
  * "A fair jaw-cracker dwarf-language must be."  --Samwise Gamgee
  */
 
-/* This file contains functions for compiling a regular expresssion.  See
- * also regexec.c which funnnily enough, contains functions for executing
+/* This file contains functions for compiling a regular expression.  See
+ * also regexec.c which funnily enough, contains functions for executing
  * a regular expression.
+ *
+ * This file is also copied at build time to ext/re/re_comp.c, where
+ * it's built with -DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG -DPERL_EXT.
+ * This causes the main functions to be compiled under new names and with
+ * debugging support added, which makes "use re 'debug'" work.
  */
 
 /* NOTE: this is derived from Henry Spencer's regexp code, and should not
@@ -4983,9 +4988,14 @@ Perl_pregfree(pTHX_ struct regexp *r)
                    (SvTYPE(new_comppad) == SVt_PVAV) ?
                                new_comppad : Null(PAD *)
                );
+               OP_REFCNT_LOCK;
                if (!OpREFCNT_dec((OP_4tree*)r->data->data[n])) {
+                   OP_REFCNT_UNLOCK;
                     op_free((OP_4tree*)r->data->data[n]);
                }
+               else {
+                   OP_REFCNT_UNLOCK;
+               }
 
                PAD_RESTORE_LOCAL(old_comppad);
                SvREFCNT_dec((SV*)new_comppad);