changeset 20959:2023b9a5c161 v8.2.1031

patch 8.2.1031: build failure with Perl5.32 Commit: https://github.com/vim/vim/commit/f5433fbfe4324fd443664fb924116b5ed675bef5 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 21 20:06:54 2020 +0200 patch 8.2.1031: build failure with Perl5.32 Problem: Build failure with Perl5.32. Solution: Define a few more functions. (Felix Yan, closes https://github.com/vim/vim/issues/6310)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Jun 2020 20:15:03 +0200
parents 4cfc5977d0fd
children aac6e5d7a58c
files src/if_perl.xs src/version.c
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -658,6 +658,11 @@ S_SvREFCNT_dec(pTHX_ SV *sv)
 }
 # endif
 
+/* perl-5.32 needs Perl_SvREFCNT_dec */
+# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
+#  define Perl_SvREFCNT_dec S_SvREFCNT_dec
+# endif
+
 /* perl-5.26 also needs S_TOPMARK and S_POPMARK. */
 # if (PERL_REVISION == 5) && (PERL_VERSION >= 26)
 PERL_STATIC_INLINE I32
@@ -682,6 +687,20 @@ S_POPMARK(pTHX)
 }
 # endif
 
+/* 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);
+}
+# endif
+
 /*
  * Make all runtime-links of perl.
  *
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1031,
+/**/
     1030,
 /**/
     1029,