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 | eaa425cc60398c8af3a511ec7553328d81f9859a (patch) | |
tree | 65417bf74a7dc6b1ad198dcf0f64abbe38d16a66 /mathoms.c | |
parent | af4a8238f7b84b26d393b15b0b0c5579e4f7a74e (diff) | |
download | perl-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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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*); |