From: David Mitchell Date: Tue, 31 May 2011 12:45:55 +0000 (+0100) Subject: [perl #91790] Perlguts documentation for sv_setref_pv X-Git-Tag: accepted/trunk/20130322.191538~3995 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddd2cc91d6090d4bcc45a8bb113437dd58fd2335;p=platform%2Fupstream%2Fperl.git [perl #91790] Perlguts documentation for sv_setref_pv The section of documentation in perlguts for the sv_setref_* functions was ambiguous: it wasn't clear whether each paragraph was referring to the function above or below it. Fix this by prepending lots of "The following function...". Also fix a couple of functions signatures. --- diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 21f827a..e77d6b8 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -619,41 +619,45 @@ L for information on converting class names into stashes. /* Still under construction */ -Upgrades rv to reference if not already one. Creates new SV for rv to -point to. If C is non-null, the SV is blessed into the specified -class. SV is returned. +The following function upgrades rv to reference if not already one. +Creates a new SV for rv to point to. If C is non-null, the SV +is blessed into the specified class. SV is returned. SV* newSVrv(SV* rv, const char* classname); -Copies integer, unsigned integer or double into an SV whose reference is C. SV is blessed -if C is non-null. +The following three functions copy integer, unsigned integer or double +into an SV whose reference is C. SV is blessed if C is +non-null. SV* sv_setref_iv(SV* rv, const char* classname, IV iv); SV* sv_setref_uv(SV* rv, const char* classname, UV uv); SV* sv_setref_nv(SV* rv, const char* classname, NV iv); -Copies the pointer value (I) into an SV whose -reference is rv. SV is blessed if C is non-null. +The following function copies the pointer value (I) into an SV whose reference is rv. SV is blessed if C +is non-null. - SV* sv_setref_pv(SV* rv, const char* classname, PV iv); + SV* sv_setref_pv(SV* rv, const char* classname, void* pv); -Copies string into an SV whose reference is C. Set length to 0 to let -Perl calculate the string length. SV is blessed if C is non-null. +The following function copies string into an SV whose reference is C. +Set length to 0 to let Perl calculate the string length. SV is blessed if +C is non-null. - SV* sv_setref_pvn(SV* rv, const char* classname, PV iv, STRLEN length); + SV* sv_setref_pvn(SV* rv, const char* classname, char* pv, STRLEN length); -Tests whether the SV is blessed into the specified class. It does not -check inheritance relationships. +The following function tests whether the SV is blessed into the specified +class. It does not check inheritance relationships. int sv_isa(SV* sv, const char* name); -Tests whether the SV is a reference to a blessed object. +The following function tests whether the SV is a reference to a blessed object. int sv_isobject(SV* sv); -Tests whether the SV is derived from the specified class. SV can be either -a reference to a blessed object or a string containing a class name. This -is the function implementing the C functionality. +The following function tests whether the SV is derived from the specified +class. SV can be either a reference to a blessed object or a string +containing a class name. This is the function implementing the +C functionality. bool sv_derived_from(SV* sv, const char* name);