summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>1999-09-29 02:21:31 +0000
committerbailey <bailey@newman.upenn.edu>1999-09-29 02:21:31 +0000
commitc529f79d594c53d3968d464c57ac24a21137dd09 (patch)
tree1a391a0c329976fd8ae88a240da31051b926c681 /regcomp.c
parent424a8fe95d507998fe8750793da1b35bd6d7074b (diff)
downloadperl-c529f79d594c53d3968d464c57ac24a21137dd09.tar.gz
resync with mainline
p4raw-id: //depot/vmsperl@4249
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/regcomp.c b/regcomp.c
index fe54a6c45a..64c06f0027 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3245,7 +3245,7 @@ Perl_regprop(pTHX_ SV *sv, regnode *o)
k = PL_regkind[(U8)OP(o)];
if (k == EXACT)
- Perl_sv_catpvf(aTHX_ sv, " <%s%*s%s>", PL_colors[0],
+ Perl_sv_catpvf(aTHX_ sv, " <%s%.*s%s>", PL_colors[0],
STR_LEN(o), STRING(o), PL_colors[1]);
else if (k == CURLY) {
if (OP(o) == CURLYM || OP(o) == CURLYN)
@@ -3257,7 +3257,7 @@ Perl_regprop(pTHX_ SV *sv, regnode *o)
else if (k == REF || k == OPEN || k == CLOSE || k == GROUPP )
Perl_sv_catpvf(aTHX_ sv, "%d", ARG(o)); /* Parenth number */
else if (k == LOGICAL)
- Perl_sv_catpvf(aTHX_ sv, "[%d]", ARG(o)); /* 2: embedded, otherwise 1 */
+ Perl_sv_catpvf(aTHX_ sv, "[%d]", o->flags); /* 2: embedded, otherwise 1 */
else if (k == BRANCHJ && (OP(o) == UNLESSM || OP(o) == IFMATCH))
Perl_sv_catpvf(aTHX_ sv, "[-%d]", o->flags);
#endif /* DEBUGGING */
@@ -3287,6 +3287,9 @@ Perl_pregfree(pTHX_ struct regexp *r)
{
dTHR;
DEBUG_r(if (!PL_colorset) reginitcolors());
+
+ if (!r || (--r->refcnt > 0))
+ return;
DEBUG_r(PerlIO_printf(Perl_debug_log,
"%sFreeing REx:%s `%s%.60s%s%s'\n",
PL_colors[4],PL_colors[5],PL_colors[0],
@@ -3294,9 +3297,6 @@ Perl_pregfree(pTHX_ struct regexp *r)
PL_colors[1],
(strlen(r->precomp) > 60 ? "..." : "")));
-
- if (!r || (--r->refcnt > 0))
- return;
if (r->precomp)
Safefree(r->precomp);
if (RX_MATCH_COPIED(r))
@@ -3395,7 +3395,7 @@ S_re_croak2(pTHX_ const char* pat1,const char* pat2,...)
#else
va_start(args);
#endif
- msv = mess(buf, &args);
+ msv = vmess(buf, &args);
va_end(args);
message = SvPV(msv,l1);
if (l1 > 512)