summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-02-18 19:40:43 +0000
committerNicholas Clark <nick@ccl4.org>2007-02-18 19:40:43 +0000
commitb9f83d2f7c4cb24d96302c6fcaa5e60628fad1f8 (patch)
tree65417bf74a7dc6b1ad198dcf0f64abbe38d16a66 /pp_hot.c
parentbe2b1c742382f74864880924170180bbe1904463 (diff)
downloadperl-b9f83d2f7c4cb24d96302c6fcaa5e60628fad1f8.tar.gz
Add a new API function newSV_type, to replace the idiom:
sv = newSV(0); sv_upgrade(sv, type); p4raw-id: //depot/perl@30347
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 5cd01be3ff..aa225c37da 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1944,8 +1944,7 @@ PP(pp_iter)
if (lv)
SvREFCNT_dec(LvTARG(lv));
else {
- lv = cx->blk_loop.iterlval = newSV(0);
- sv_upgrade(lv, SVt_PVLV);
+ lv = cx->blk_loop.iterlval = newSV_type(SVt_PVLV);
LvTYPE(lv) = 'y';
sv_magic(lv, NULL, PERL_MAGIC_defelem, NULL, 0);
}