From 5fcca6468acbb09c57cf703ad97b25b199d27158 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 6 Sep 2020 10:17:42 -0600 Subject: perlapi: Consolidate Sv{INU]VX-ish entries --- sv.h | 63 +++++++++++++++++++++++++++------------------------------------ 1 file changed, 27 insertions(+), 36 deletions(-) (limited to 'sv.h') diff --git a/sv.h b/sv.h index 423a7375df..0742b7071c 100644 --- a/sv.h +++ b/sv.h @@ -1577,58 +1577,49 @@ 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 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_item SvIVx +=for apidoc_item SvIV_nomg -=for apidoc Am|IV|SvIVx|SV* sv -Coerces the given SV to IV and returns it. The returned value in many +These coerce the given SV to IV and return 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 -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). +C is different from the others in that it is guaranteed to evaluate +C exactly once; the others may evaluate it multiple times. Only use this +form if C is an expression with side effects, otherwise use the more +efficient C. -See C> for a version which guarantees to evaluate C only once. +C is the same as C, but does not perform 'get' magic. -=for apidoc Am|NV|SvNV_nomg|SV* sv -Like C but doesn't process magic. +=for apidoc Am|NV|SvNV|SV* sv +=for apidoc_item SvNVx +=for apidoc_item SvNV_nomg -=for apidoc Am|NV|SvNVx|SV* sv -Coerces the given SV to NV and returns it. The returned value in many +These coerce the given SV to NV and return 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. +C is different from the others in that it is guaranteed to evaluate +C exactly once; the others may evaluate it multiple times. Only use this +form 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 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). +C is the same as C, but does not perform 'get' magic. -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|SvUV|SV* sv +=for apidoc_item SvUVx +=for apidoc_item SvUV_nomg -=for apidoc Am|UV|SvUVx|SV* sv -Coerces the given SV to UV and returns it. The returned value in many +These coerce the given SV to UV and return 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. +C is different from the others in that it is guaranteed to evaluate +C exactly once; the others may evaluate it multiple times. Only use this +form if C is an expression with side effects, otherwise use the more +efficient C. + +C is the same as C, but does not perform 'get' magic. =for apidoc Am|bool|SvTRUE|SV* sv Returns a boolean indicating whether Perl would evaluate the SV as true or -- cgit v1.2.1