Mercurial > vim
changeset 11496:af0c969f7b3e v8.0.0631
patch 8.0.0631: can't build with Perl 5.26
commit https://github.com/vim/vim/commit/fa4161cb0c266378012d3fde0eca56da8739528d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 10 15:46:23 2017 +0200
patch 8.0.0631: can't build with Perl 5.26
Problem: Perl 5.26 also needs S_TOPMARK and S_POPMARK defined.
Solution: Define the functions when needed. (Jesin, closes https://github.com/vim/vim/issues/1748)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Jun 2017 16:00:03 +0200 |
parents | 2d448ff0efa2 |
children | e7c087f651fa |
files | src/if_perl.xs src/version.c |
diffstat | 2 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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. *