diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-08 11:09:10 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-08 11:09:10 +0000 |
commit | fbf9f98379663b1157bb1fda639aa04bc8781c89 (patch) | |
tree | 2c2f517082231c9775759ae45fbc28fa603e424e | |
parent | b7bf404b7a72f55bf93065ae7b25a5ba0a9ff7f6 (diff) | |
download | perl-fbf9f98379663b1157bb1fda639aa04bc8781c89.tar.gz |
Change the API doc for some of the SvXXX testing macros.
Often, those macros simply test a bit in sv_flags, so
the return value should be assigned to a U32 instead of
a bool to avoid truncation. (bug perl #32884)
p4raw-id: //depot/perl@29718
-rw-r--r-- | pod/perlapi.pod | 48 | ||||
-rw-r--r-- | sv.h | 48 |
2 files changed, 48 insertions, 48 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 9acb5f9a0c..4cec94a430 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -3756,9 +3756,9 @@ Found in file sv.h =item SvIOK X<SvIOK> -Returns a boolean indicating whether the SV contains an integer. +Returns a U32 value indicating whether the SV contains an integer. - bool SvIOK(SV* sv) + U32 SvIOK(SV* sv) =for hackers Found in file sv.h @@ -3766,10 +3766,10 @@ Found in file sv.h =item SvIOKp X<SvIOKp> -Returns a boolean indicating whether the SV contains an integer. Checks +Returns a U32 value indicating whether the SV contains an integer. Checks the B<private> setting. Use C<SvIOK>. - bool SvIOKp(SV* sv) + U32 SvIOKp(SV* sv) =for hackers Found in file sv.h @@ -3947,10 +3947,10 @@ Found in file sv.h =item SvNIOK X<SvNIOK> -Returns a boolean indicating whether the SV contains a number, integer or +Returns a U32 value indicating whether the SV contains a number, integer or double. - bool SvNIOK(SV* sv) + U32 SvNIOK(SV* sv) =for hackers Found in file sv.h @@ -3958,10 +3958,10 @@ Found in file sv.h =item SvNIOKp X<SvNIOKp> -Returns a boolean indicating whether the SV contains a number, integer or +Returns a U32 value indicating whether the SV contains a number, integer or double. Checks the B<private> setting. Use C<SvNIOK>. - bool SvNIOKp(SV* sv) + U32 SvNIOKp(SV* sv) =for hackers Found in file sv.h @@ -3979,9 +3979,9 @@ Found in file sv.h =item SvNOK X<SvNOK> -Returns a boolean indicating whether the SV contains a double. +Returns a U32 value indicating whether the SV contains a double. - bool SvNOK(SV* sv) + U32 SvNOK(SV* sv) =for hackers Found in file sv.h @@ -3989,10 +3989,10 @@ Found in file sv.h =item SvNOKp X<SvNOKp> -Returns a boolean indicating whether the SV contains a double. Checks the +Returns a U32 value indicating whether the SV contains a double. Checks the B<private> setting. Use C<SvNOK>. - bool SvNOKp(SV* sv) + U32 SvNOKp(SV* sv) =for hackers Found in file sv.h @@ -4073,10 +4073,10 @@ Found in file sv.h =item SvOK X<SvOK> -Returns a boolean indicating whether the value is an SV. It also tells +Returns a U32 value indicating whether the value is an SV. It also tells whether the value is defined or not. - bool SvOK(SV* sv) + U32 SvOK(SV* sv) =for hackers Found in file sv.h @@ -4084,12 +4084,12 @@ Found in file sv.h =item SvOOK X<SvOOK> -Returns a boolean indicating whether the SvIVX is a valid offset value for +Returns a U32 indicating whether the SvIVX is a valid offset value for the SvPVX. This hack is used internally to speed up removal of characters from the beginning of a SvPV. When SvOOK is true, then the start of the allocated string buffer is really (SvPVX - SvIVX). - bool SvOOK(SV* sv) + U32 SvOOK(SV* sv) =for hackers Found in file sv.h @@ -4097,10 +4097,10 @@ Found in file sv.h =item SvPOK X<SvPOK> -Returns a boolean indicating whether the SV contains a character +Returns a U32 value indicating whether the SV contains a character string. - bool SvPOK(SV* sv) + U32 SvPOK(SV* sv) =for hackers Found in file sv.h @@ -4108,10 +4108,10 @@ Found in file sv.h =item SvPOKp X<SvPOKp> -Returns a boolean indicating whether the SV contains a character string. +Returns a U32 value indicating whether the SV contains a character string. Checks the B<private> setting. Use C<SvPOK>. - bool SvPOKp(SV* sv) + U32 SvPOKp(SV* sv) =for hackers Found in file sv.h @@ -4478,7 +4478,7 @@ X<SvROK> Tests if the SV is an RV. - bool SvROK(SV* sv) + U32 SvROK(SV* sv) =for hackers Found in file sv.h @@ -4615,7 +4615,7 @@ X<SvUOK> Returns a boolean indicating whether the SV contains an unsigned integer. - void SvUOK(SV* sv) + bool SvUOK(SV* sv) =for hackers Found in file sv.h @@ -4634,11 +4634,11 @@ Found in file sv.h =item SvUTF8 X<SvUTF8> -Returns a boolean indicating whether the SV contains UTF-8 encoded data. +Returns a U32 value indicating whether the SV contains UTF-8 encoded data. Call this after SvPV() in case any call to string overloading updates the internal flag. - bool SvUTF8(SV* sv) + U32 SvUTF8(SV* sv) =for hackers Found in file sv.h @@ -759,35 +759,35 @@ struct xpvio { /* The following macros define implementation-independent predicates on SVs. */ /* -=for apidoc Am|bool|SvNIOK|SV* sv -Returns a boolean indicating whether the SV contains a number, integer or +=for apidoc Am|U32|SvNIOK|SV* sv +Returns a U32 value indicating whether the SV contains a number, integer or double. -=for apidoc Am|bool|SvNIOKp|SV* sv -Returns a boolean indicating whether the SV contains a number, integer or +=for apidoc Am|U32|SvNIOKp|SV* sv +Returns a U32 value indicating whether the SV contains a number, integer or double. Checks the B<private> setting. Use C<SvNIOK>. =for apidoc Am|void|SvNIOK_off|SV* sv Unsets the NV/IV status of an SV. -=for apidoc Am|bool|SvOK|SV* sv -Returns a boolean indicating whether the value is an SV. It also tells +=for apidoc Am|U32|SvOK|SV* sv +Returns a U32 value indicating whether the value is an SV. It also tells whether the value is defined or not. -=for apidoc Am|bool|SvIOKp|SV* sv -Returns a boolean indicating whether the SV contains an integer. Checks +=for apidoc Am|U32|SvIOKp|SV* sv +Returns a U32 value indicating whether the SV contains an integer. Checks the B<private> setting. Use C<SvIOK>. -=for apidoc Am|bool|SvNOKp|SV* sv -Returns a boolean indicating whether the SV contains a double. Checks the +=for apidoc Am|U32|SvNOKp|SV* sv +Returns a U32 value indicating whether the SV contains a double. Checks the B<private> setting. Use C<SvNOK>. -=for apidoc Am|bool|SvPOKp|SV* sv -Returns a boolean indicating whether the SV contains a character string. +=for apidoc Am|U32|SvPOKp|SV* sv +Returns a U32 value indicating whether the SV contains a character string. Checks the B<private> setting. Use C<SvPOK>. -=for apidoc Am|bool|SvIOK|SV* sv -Returns a boolean indicating whether the SV contains an integer. +=for apidoc Am|U32|SvIOK|SV* sv +Returns a U32 value indicating whether the SV contains an integer. =for apidoc Am|void|SvIOK_on|SV* sv Tells an SV that it is an integer. @@ -804,14 +804,14 @@ Tells and SV that it is an unsigned integer and disables all other OK bits. =for apidoc Am|bool|SvIOK_UV|SV* sv Returns a boolean indicating whether the SV contains an unsigned integer. -=for apidoc Am|void|SvUOK|SV* sv +=for apidoc Am|bool|SvUOK|SV* sv Returns a boolean indicating whether the SV contains an unsigned integer. =for apidoc Am|bool|SvIOK_notUV|SV* sv Returns a boolean indicating whether the SV contains a signed integer. -=for apidoc Am|bool|SvNOK|SV* sv -Returns a boolean indicating whether the SV contains a double. +=for apidoc Am|U32|SvNOK|SV* sv +Returns a U32 value indicating whether the SV contains a double. =for apidoc Am|void|SvNOK_on|SV* sv Tells an SV that it is a double. @@ -822,8 +822,8 @@ Unsets the NV status of an SV. =for apidoc Am|void|SvNOK_only|SV* sv Tells an SV that it is a double and disables all other OK bits. -=for apidoc Am|bool|SvPOK|SV* sv -Returns a boolean indicating whether the SV contains a character +=for apidoc Am|U32|SvPOK|SV* sv +Returns a U32 value indicating whether the SV contains a character string. =for apidoc Am|void|SvPOK_on|SV* sv @@ -839,13 +839,13 @@ Will also turn off the UTF-8 status. =for apidoc Am|bool|SvVOK|SV* sv Returns a boolean indicating whether the SV contains a v-string. -=for apidoc Am|bool|SvOOK|SV* sv -Returns a boolean indicating whether the SvIVX is a valid offset value for +=for apidoc Am|U32|SvOOK|SV* sv +Returns a U32 indicating whether the SvIVX is a valid offset value for the SvPVX. This hack is used internally to speed up removal of characters from the beginning of a SvPV. When SvOOK is true, then the start of the allocated string buffer is really (SvPVX - SvIVX). -=for apidoc Am|bool|SvROK|SV* sv +=for apidoc Am|U32|SvROK|SV* sv Tests if the SV is an RV. =for apidoc Am|void|SvROK_on|SV* sv @@ -983,8 +983,8 @@ Set the actual length of the string which is in the SV. See C<SvIV_set>. SvFLAGS(sv) |= (SVf_NOK|SVp_NOK)) /* -=for apidoc Am|bool|SvUTF8|SV* sv -Returns a boolean indicating whether the SV contains UTF-8 encoded data. +=for apidoc Am|U32|SvUTF8|SV* sv +Returns a U32 value indicating whether the SV contains UTF-8 encoded data. Call this after SvPV() in case any call to string overloading updates the internal flag. |