summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-10 15:46:23 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-10 15:46:23 +0200
commitfa4161cb0c266378012d3fde0eca56da8739528d (patch)
treee88254924ad473cc73f9dde6b8790d117366d8a8
parentf84b122a99da75741ae686fabb6f81b8b4755998 (diff)
downloadvim-git-fa4161cb0c266378012d3fde0eca56da8739528d.tar.gz
patch 8.0.0631: can't build with Perl 5.26v8.0.0631
Problem: Perl 5.26 also needs S_TOPMARK and S_POPMARK defined. Solution: Define the functions when needed. (Jesin, closes #1748)
-rw-r--r--src/if_perl.xs24
-rw-r--r--src/version.c2
2 files changed, 26 insertions, 0 deletions
diff --git a/src/if_perl.xs b/src/if_perl.xs
index 2bf72c534..c62e8d2d9 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -633,6 +633,30 @@ S_SvREFCNT_dec(pTHX_ SV *sv)
}
# endif
+/* perl-5.26 also needs S_TOPMARK and S_POPMARK. */
+# if (PERL_REVISION == 5) && (PERL_VERSION >= 26)
+PERL_STATIC_INLINE I32
+S_TOPMARK(pTHX)
+{
+ DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,
+ "MARK top %p %" IVdf "\n",
+ PL_markstack_ptr,
+ (IV)*PL_markstack_ptr)));
+ return *PL_markstack_ptr;
+}
+
+PERL_STATIC_INLINE I32
+S_POPMARK(pTHX)
+{
+ DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,
+ "MARK pop %p %" IVdf "\n",
+ (PL_markstack_ptr-1),
+ (IV)*(PL_markstack_ptr-1))));
+ assert((PL_markstack_ptr > PL_markstack) || !"MARK underflow");
+ return *PL_markstack_ptr--;
+}
+# endif
+
/*
* Make all runtime-links of perl.
*
diff --git a/src/version.c b/src/version.c
index 5bebc54ac..8f59546be 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 631,
+/**/
630,
/**/
629,