summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-06-17 11:16:38 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-06-17 11:16:38 +0000
commitab69dbc258121720f9942be91726a46752320460 (patch)
treeb9f48800e6f66b11c7db1ecea7c17c32622223e6
parent8433848b134d4e61d5135fd8a70d8106025ac6a6 (diff)
downloadperl-ab69dbc258121720f9942be91726a46752320460.tar.gz
Rename the new macro clear_errsv() from last patch to CLEAR_ERRSV()
p4raw-id: //depot/perl@34069
-rw-r--r--op.c2
-rw-r--r--perl.c6
-rw-r--r--perl.h2
-rw-r--r--pp_ctl.c16
4 files changed, 12 insertions, 14 deletions
diff --git a/op.c b/op.c
index d18e6da2c7..728be109fc 100644
--- a/op.c
+++ b/op.c
@@ -2521,7 +2521,7 @@ Perl_fold_constants(pTHX_ register OP *o)
case 3:
/* Something tried to die. Abandon constant folding. */
/* Pretend the error never happened. */
- clear_errsv();
+ CLEAR_ERRSV();
o->op_next = old_next;
break;
default:
diff --git a/perl.c b/perl.c
index fe01ec035b..0698996b1a 100644
--- a/perl.c
+++ b/perl.c
@@ -2680,7 +2680,7 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags)
CALL_BODY_SUB((OP*)&myop);
retval = PL_stack_sp - (PL_stack_base + oldmark);
if (!(flags & G_KEEPERR)) {
- clear_errsv();
+ CLEAR_ERRSV();
}
break;
case 1:
@@ -2782,7 +2782,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags)
CALL_BODY_EVAL((OP*)&myop);
retval = PL_stack_sp - (PL_stack_base + oldmark);
if (!(flags & G_KEEPERR)) {
- clear_errsv();
+ CLEAR_ERRSV();
}
break;
case 1:
@@ -3561,7 +3561,7 @@ S_init_main_stash(pTHX)
gv_SVadd(PL_errgv);
#endif
sv_grow(ERRSV, 240); /* Preallocate - for immediate signals. */
- clear_errsv();
+ CLEAR_ERRSV();
PL_curstash = PL_defstash;
CopSTASH_set(&PL_compiling, PL_defstash);
PL_debstash = GvHV(gv_fetchpvs("DB::", GV_ADDMULTI, SVt_PVHV));
diff --git a/perl.h b/perl.h
index aa3df96fd7..7e66b56c65 100644
--- a/perl.h
+++ b/perl.h
@@ -6008,7 +6008,7 @@ extern void moncontrol(int);
#endif /* Include guard */
-#define clear_errsv() STMT_START { sv_setpvn(ERRSV,"",0); if (SvMAGICAL(ERRSV)) { mg_free(ERRSV); } SvPOK_only(ERRSV); } STMT_END
+#define CLEAR_ERRSV() STMT_START { sv_setpvn(ERRSV,"",0); if (SvMAGICAL(ERRSV)) { mg_free(ERRSV); } SvPOK_only(ERRSV); } STMT_END
/*
* Local variables:
diff --git a/pp_ctl.c b/pp_ctl.c
index 38e171f217..fd8c87f0a9 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2149,7 +2149,7 @@ PP(pp_return)
LEAVESUB(sv);
if (clear_errsv) {
- clear_errsv();
+ CLEAR_ERRSV();
}
return retop;
}
@@ -3001,9 +3001,8 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
CopARYBASE_set(PL_curcop, 0);
if (saveop && (saveop->op_type != OP_REQUIRE) && (saveop->op_flags & OPf_SPECIAL))
PL_in_eval |= EVAL_KEEPERR;
- else {
- clear_errsv();
- }
+ else
+ CLEAR_ERRSV();
if (yyparse() || PL_parser->error_count || !PL_eval_root) {
SV **newsp; /* Used by POPBLOCK. */
PERL_CONTEXT *cx = &cxstack[cxstack_ix];
@@ -3775,7 +3774,7 @@ PP(pp_leaveeval)
else {
LEAVE;
if (!(save_flags & OPf_SPECIAL)) {
- clear_errsv();
+ CLEAR_ERRSV();
}
}
@@ -3819,9 +3818,8 @@ Perl_create_eval_scope(pTHX_ U32 flags)
PL_in_eval = EVAL_INEVAL;
if (flags & G_KEEPERR)
PL_in_eval |= EVAL_KEEPERR;
- else {
- clear_errsv();
- }
+ else
+ CLEAR_ERRSV();
if (flags & G_FAKINGEVAL) {
PL_eval_root = PL_op; /* Only needed so that goto works right. */
}
@@ -3880,7 +3878,7 @@ PP(pp_leavetry)
PL_curpm = newpm; /* Don't pop $1 et al till now */
LEAVE;
- clear_errsv();
+ CLEAR_ERRSV();
RETURN;
}