X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/b57dd509f79945100ac318635982f75a676b5560..04e8f31976b33aacdeb5a6d9c5b75dda622712b8:/sv.h diff --git a/sv.h b/sv.h index 5e9c5b6..51e9b0b 100644 --- a/sv.h +++ b/sv.h @@ -1521,43 +1521,58 @@ Like C but doesn't set a length variable. Like C but doesn't process magic. =for apidoc Am|IV|SvIV|SV* sv -Coerces the given SV to an integer and returns it. See C> for a -version which guarantees to evaluate C only once. +Coerces the given SV to IV and returns it. The returned value in many +circumstances will get stored in C's IV slot, but not in all cases. (Use +C> to make sure it does). + +See C> for a version which guarantees to evaluate C only once. =for apidoc Am|IV|SvIV_nomg|SV* sv Like C but doesn't process magic. =for apidoc Am|IV|SvIVx|SV* sv -Coerces the given SV to an integer and returns it. -Guarantees to evaluate C only once. Only use -this if C is an expression with side effects, -otherwise use the more efficient C. +Coerces the given SV to IV and returns it. The returned value in many +circumstances will get stored in C's IV slot, but not in all cases. (Use +C> to make sure it does). + +This form guarantees to evaluate C only once. Only use this if C is an +expression with side effects, otherwise use the more efficient C. =for apidoc Am|NV|SvNV|SV* sv -Coerce the given SV to a double and return it. See C> for a version -which guarantees to evaluate C only once. +Coerces the given SV to NV and returns it. The returned value in many +circumstances will get stored in C's NV slot, but not in all cases. (Use +C> to make sure it does). + +See C> for a version which guarantees to evaluate C only once. =for apidoc Am|NV|SvNV_nomg|SV* sv Like C but doesn't process magic. =for apidoc Am|NV|SvNVx|SV* sv -Coerces the given SV to a double and returns it. -Guarantees to evaluate C only once. Only use -this if C is an expression with side effects, -otherwise use the more efficient C. +Coerces the given SV to NV and returns it. The returned value in many +circumstances will get stored in C's NV slot, but not in all cases. (Use +C> to make sure it does). + +This form guarantees to evaluate C only once. Only use this if C is an +expression with side effects, otherwise use the more efficient C. =for apidoc Am|UV|SvUV|SV* sv -Coerces the given SV to an unsigned integer and returns it. See C> -for a version which guarantees to evaluate C only once. +Coerces the given SV to UV and returns it. The returned value in many +circumstances will get stored in C's UV slot, but not in all cases. (Use +C> to make sure it does). + +See C> for a version which guarantees to evaluate C only once. =for apidoc Am|UV|SvUV_nomg|SV* sv Like C but doesn't process magic. =for apidoc Am|UV|SvUVx|SV* sv -Coerces the given SV to an unsigned integer and -returns it. Guarantees to evaluate C only once. Only -use this if C is an expression with side effects, -otherwise use the more efficient C. +Coerces the given SV to UV and returns it. The returned value in many +circumstances will get stored in C's UV slot, but not in all cases. (Use +C> to make sure it does). + +This form guarantees to evaluate C only once. Only use this if C is an +expression with side effects, otherwise use the more efficient C. =for apidoc Am|bool|SvTRUE|SV* sv Returns a boolean indicating whether Perl would evaluate the SV as true or