diff options
author | Yves Orton <demerphq@gmail.com> | 2022-04-21 06:15:41 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-05-27 21:18:10 -0600 |
commit | 57e785fdb86b4eb41afd139372aab7841223385f (patch) | |
tree | d7561b1007faa9ceb57bc3d0228f1968da2e86c4 /inline.h | |
parent | c5e6a2f4b4dc5540429a0fde0a5b2b01fc167689 (diff) | |
download | perl-57e785fdb86b4eb41afd139372aab7841223385f.tar.gz |
fixup, use old logic until 5.37 - TO BE SQUASHED
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3475,7 +3475,15 @@ Perl_mortal_getenv(const char * str) PERL_STATIC_INLINE bool Perl_sv_isbool(pTHX_ const SV *sv) { - return SvBoolFlagsOK(sv) && BOOL_INTERNALS_sv_isbool(sv); + /* change to the following in 5.37, logically the same but + * more efficient and more future proof */ +#if 0 + return (SvBoolFlagsOK(sv) && BOOL_INTERNALS_sv_isbool(sv)); +#else + return SvIOK(sv) && SvPOK(sv) && SvIsCOW_static(sv) && + (SvPVX_const(sv) == PL_Yes || SvPVX_const(sv) == PL_No); +#endif + } #ifdef USE_ITHREADS |