summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-09-06 10:17:42 -0600
committerKarl Williamson <khw@cpan.org>2020-11-22 17:37:28 -0700
commit5fcca6468acbb09c57cf703ad97b25b199d27158 (patch)
tree9f41bdf57f8e2f8516fcd87b6446f293a6afd871 /sv.h
parent581f869ed3f672307ccaa86023334fa0622481a4 (diff)
downloadperl-5fcca6468acbb09c57cf703ad97b25b199d27158.tar.gz
perlapi: Consolidate Sv{INU]VX-ish entries
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h63
1 files changed, 27 insertions, 36 deletions
diff --git a/sv.h b/sv.h
index 423a7375df..0742b7071c 100644
--- a/sv.h
+++ b/sv.h
@@ -1577,58 +1577,49 @@ Like C<SvPV> but doesn't set a length variable.
Like C<SvPV_nolen> 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<sv>'s IV slot, but not in all cases. (Use
-C<L</sv_setiv>> to make sure it does).
-
-See C<L</SvIVx>> for a version which guarantees to evaluate C<sv> only once.
-
-=for apidoc Am|IV|SvIV_nomg|SV* sv
-Like C<SvIV> 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<sv>'s IV slot, but not in all cases. (Use
C<L</sv_setiv>> to make sure it does).
-This form guarantees to evaluate C<sv> only once. Only use this if C<sv> is an
-expression with side effects, otherwise use the more efficient C<SvIV>.
-
-=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<sv>'s NV slot, but not in all cases. (Use
-C<L</sv_setnv>> to make sure it does).
+C<SvIVx> is different from the others in that it is guaranteed to evaluate
+C<sv> exactly once; the others may evaluate it multiple times. Only use this
+form if C<sv> is an expression with side effects, otherwise use the more
+efficient C<SvIV>.
-See C<L</SvNVx>> for a version which guarantees to evaluate C<sv> only once.
+C<SvIV_nomg> is the same as C<SvIV>, but does not perform 'get' magic.
-=for apidoc Am|NV|SvNV_nomg|SV* sv
-Like C<SvNV> 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<sv>'s NV slot, but not in all cases. (Use
C<L</sv_setnv>> to make sure it does).
-This form guarantees to evaluate C<sv> only once. Only use this if C<sv> is an
-expression with side effects, otherwise use the more efficient C<SvNV>.
+C<SvNVx> is different from the others in that it is guaranteed to evaluate
+C<sv> exactly once; the others may evaluate it multiple times. Only use this
+form if C<sv> is an expression with side effects, otherwise use the more
+efficient C<SvNV>.
-=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<sv>'s UV slot, but not in all cases. (Use
-C<L</sv_setuv>> to make sure it does).
+C<SvNV_nomg> is the same as C<SvNV>, but does not perform 'get' magic.
-See C<L</SvUVx>> for a version which guarantees to evaluate C<sv> only once.
-
-=for apidoc Am|UV|SvUV_nomg|SV* sv
-Like C<SvUV> 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<sv>'s UV slot, but not in all cases. (Use
C<L</sv_setuv>> to make sure it does).
-This form guarantees to evaluate C<sv> only once. Only use this if C<sv> is an
-expression with side effects, otherwise use the more efficient C<SvUV>.
+C<SvUVx> is different from the others in that it is guaranteed to evaluate
+C<sv> exactly once; the others may evaluate it multiple times. Only use this
+form if C<sv> is an expression with side effects, otherwise use the more
+efficient C<SvUV>.
+
+C<SvUV_nomg> is the same as C<SvUV>, 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