From: Joe Schaefer Date: Tue, 12 Aug 2003 13:21:42 +0000 (-0400) Subject: perlapi.pod tweaks, based on : X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d34c2299ce15c4bc317af0031fa77cc4a77ec346;p=p5sagit%2Fp5-mst-13.2.git perlapi.pod tweaks, based on : Subject: misdocumented return value for sv_setref* Message-ID: p4raw-id: //depot/perl@20912 --- diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 2bbbc66..96766c1 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -4367,7 +4367,7 @@ Copies an integer into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. SV* sv_setref_iv(SV* rv, const char* classname, IV iv) @@ -4380,7 +4380,7 @@ Copies a double into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. SV* sv_setref_nv(SV* rv, const char* classname, NV nv) @@ -4394,7 +4394,7 @@ argument will be upgraded to an RV. That RV will be modified to point to the new SV. If the C argument is NULL then C will be placed into the SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. Do not use with other Perl types such as HV, AV, SV, CV, because those objects will become corrupted by the pointer copy process. @@ -4412,8 +4412,8 @@ Copies a string into a new SV, optionally blessing the SV. The length of the string must be specified with C. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to -C to avoid the blessing. The new SV will be returned and will have -a reference count of 1. +C to avoid the blessing. The new SV will have a reference count +of 1, and the RV will be returned. Note that C copies the pointer while this copies the string. @@ -4428,7 +4428,7 @@ Copies an unsigned integer into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. SV* sv_setref_uv(SV* rv, const char* classname, UV uv) diff --git a/sv.c b/sv.c index c93c0ea..34700c2 100644 --- a/sv.c +++ b/sv.c @@ -7993,7 +7993,7 @@ argument will be upgraded to an RV. That RV will be modified to point to the new SV. If the C argument is NULL then C will be placed into the SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. Do not use with other Perl types such as HV, AV, SV, CV, because those objects will become corrupted by the pointer copy process. @@ -8022,7 +8022,7 @@ Copies an integer into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. =cut */ @@ -8041,7 +8041,7 @@ Copies an unsigned integer into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. =cut */ @@ -8060,7 +8060,7 @@ Copies a double into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV -will be returned and will have a reference count of 1. +will have a reference count of 1, and the RV will be returned. =cut */ @@ -8079,8 +8079,8 @@ Copies a string into a new SV, optionally blessing the SV. The length of the string must be specified with C. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to -C to avoid the blessing. The new SV will be returned and will have -a reference count of 1. +C to avoid the blessing. The new SV will have a reference count +of 1, and the RV will be returned. Note that C copies the pointer while this copies the string.