In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/3127113cbf175740dce688a3320c9d62ece9b910?hp=da1830f5b059251a3031add1d03b8a965ab2c773>
- Log ----------------------------------------------------------------- commit 3127113cbf175740dce688a3320c9d62ece9b910 Author: Pali <[email protected]> Date: Mon Jun 17 14:09:08 2019 +0200 Document SvTRUEx() macro ----------------------------------------------------------------------- Summary of changes: sv.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sv.h b/sv.h index 637cd14dc0..15adf03449 100644 --- a/sv.h +++ b/sv.h @@ -1601,10 +1601,21 @@ false. See C<L</SvOK>> for a defined/undefined test. Handles 'get' magic unless the scalar is already C<SvPOK>, C<SvIOK> or C<SvNOK> (the public, not the private flags). +See C<L</SvTRUEx>> for a version which guarantees to evaluate C<sv> only once. + =for apidoc Am|bool|SvTRUE_nomg|SV* sv Returns a boolean indicating whether Perl would evaluate the SV as true or false. See C<L</SvOK>> for a defined/undefined test. Does not handle 'get' magic. +=for apidoc Am|bool|SvTRUEx|SV* sv +Returns a boolean indicating whether Perl would evaluate the SV as true or +false. See C<L</SvOK>> for a defined/undefined test. Handles 'get' magic +unless the scalar is already C<SvPOK>, C<SvIOK> or C<SvNOK> (the public, not the +private flags). + +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<SvTRUE>. + =for apidoc Am|char*|SvPVutf8_force|SV* sv|STRLEN len Like C<SvPV_force>, but converts C<sv> to UTF-8 first if necessary. -- Perl5 Master Repository
