Patch 8.2.2891
Problem: Cannot build with Perl 5.34.
Solution: Add Perl_SvTRUE_common(). (Ozaki Kiichi, closes #8266,
closes #8250)
Files: src/if_perl.xs
*** ../vim-8.2.2890/src/if_perl.xs 2020-10-31 13:05:08.347282036 +0100
--- src/if_perl.xs 2021-05-27 17:59:06.861080216 +0200
***************
*** 700,711 ****
/* perl-5.32 needs Perl_POPMARK */
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
# define Perl_POPMARK S_POPMARK
/* perl-5.32 needs Perl_SvTRUE */
PERL_STATIC_INLINE bool
Perl_SvTRUE(pTHX_ SV *sv) {
if (!LIKELY(sv))
! return FALSE;
SvGETMAGIC(sv);
return SvTRUE_nomg_NN(sv);
}
--- 700,740 ----
/* perl-5.32 needs Perl_POPMARK */
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
# define Perl_POPMARK S_POPMARK
+ # endif
+
+ /* perl-5.34 needs Perl_SvTRUE_common; used in SvTRUE_nomg_NN */
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 34)
+ PERL_STATIC_INLINE bool
+ Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback)
+ {
+ if (UNLIKELY(SvIMMORTAL_INTERP(sv)))
+ return SvIMMORTAL_TRUE(sv);
+
+ if (! SvOK(sv))
+ return FALSE;
+
+ if (SvPOK(sv))
+ return SvPVXtrue(sv);
+
+ if (SvIOK(sv))
+ return SvIVX(sv) != 0; /* casts to bool */
+
+ if (SvROK(sv) && !(SvOBJECT(SvRV(sv)) && HvAMAGIC(SvSTASH(SvRV(sv)))))
+ return TRUE;
+
+ if (sv_2bool_is_fallback)
+ return sv_2bool_nomg(sv);
+
+ return isGV_with_GP(sv);
+ }
+ # endif
/* perl-5.32 needs Perl_SvTRUE */
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
PERL_STATIC_INLINE bool
Perl_SvTRUE(pTHX_ SV *sv) {
if (!LIKELY(sv))
! return FALSE;
SvGETMAGIC(sv);
return SvTRUE_nomg_NN(sv);
}
*** ../vim-8.2.2890/src/version.c 2021-05-26 22:32:06.254066656 +0200
--- src/version.c 2021-05-27 18:02:46.980549319 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2891,
/**/
--
The early bird gets the worm. The second mouse gets the cheese.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202105271607.14RG78jo1017182%40masaka.moolenaar.net.