summaryrefslogtreecommitdiff
path: root/mathoms.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
commiteaa425cc60398c8af3a511ec7553328d81f9859a (patch)
tree65417bf74a7dc6b1ad198dcf0f64abbe38d16a66 /mathoms.c
parentaf4a8238f7b84b26d393b15b0b0c5579e4f7a74e (diff)
downloadperl-eaa425cc60398c8af3a511ec7553328d81f9859a.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 'mathoms.c')
-rw-r--r--mathoms.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mathoms.c b/mathoms.c
index 7d6f142c07..708645e30f 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -547,9 +547,7 @@ AV *
Perl_av_fake(pTHX_ register I32 size, register SV **strp)
{
register SV** ary;
- register AV * const av = (AV*)newSV(0);
-
- sv_upgrade((SV *)av, SVt_PVAV);
+ register AV * const av = (AV*)newSV_type(SVt_PVAV);
Newx(ary,size+1,SV*);
AvALLOC(av) = ary;
Copy(strp,ary,size,SV*);