diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-02-18 19:40:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-02-18 19:40:43 +0000 |
commit | b9f83d2f7c4cb24d96302c6fcaa5e60628fad1f8 (patch) | |
tree | 65417bf74a7dc6b1ad198dcf0f64abbe38d16a66 /pp_hot.c | |
parent | be2b1c742382f74864880924170180bbe1904463 (diff) | |
download | perl-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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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); } |