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 /mathoms.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 '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*); |