summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-04-11 14:53:38 +0000
committerNicholas Clark <nick@ccl4.org>2005-04-11 14:53:38 +0000
commitf398eb67d321bfe2b4dd05cb57fa3c94a3337abc (patch)
tree726554b8eb3fa475c0947adbde895208e046729e /pp_ctl.c
parentf024374aaec3af368c46dadae280209e8297c32a (diff)
downloadperl-f398eb67d321bfe2b4dd05cb57fa3c94a3337abc.tar.gz
Avoid taking a reference to SvIVX and putting that address on the
save stack p4raw-id: //depot/perl@24228
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 71634fbf84..933fb3f013 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2426,13 +2426,14 @@ PP(pp_goto)
SV *sv = GvSV(PL_DBsub);
CV *gotocv;
+ save_item(sv);
if (PERLDB_SUB_NN) {
- (void)SvUPGRADE(sv, SVt_PVIV);
+ int type = SvTYPE(sv);
+ if (type < SVt_PVIV && type != SVt_IV)
+ sv_upgrade(sv, SVt_PVIV);
(void)SvIOK_on(sv);
- SAVEIV(SvIVX(sv));
SvIV_set(sv, PTR2IV(cv)); /* Do it the quickest way */
} else {
- save_item(sv);
gv_efullname3(sv, CvGV(cv), Nullch);
}
if ( PERLDB_GOTO