- Fix build with perl 5.24 (perl-5.24.patch)
OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=361
This commit is contained in:
parent
0b6397a63e
commit
00c4e15750
57
perl-5.24.patch
Normal file
57
perl-5.24.patch
Normal file
@ -0,0 +1,57 @@
|
||||
UPDADE: Use Perl macro SvREFCNT_inc_void_NN() instead of SvREFCNT()++
|
||||
suggested by Ken Takata.
|
||||
|
||||
=for apidoc Am|void|SvREFCNT_inc_void_NN|SV* sv
|
||||
Same as C<SvREFCNT_inc>, but can only be used if you don't need the return
|
||||
value, and you know that C<sv> is not C<NULL>. The macro doesn't need
|
||||
to return a meaningful value, or check for NULLness, so it's smaller
|
||||
and faster.
|
||||
|
||||
diff -r 030b239e7b25 src/if_perl.xs
|
||||
--- a/src/if_perl.xs Sun May 01 23:15:06 2016 +0200
|
||||
+++ b/src/if_perl.xs Mon May 02 08:17:33 2016 +0200
|
||||
@@ -602,13 +602,20 @@ static struct {
|
||||
};
|
||||
|
||||
/* Work around for perl-5.18.
|
||||
- * The definitions of S_SvREFCNT_inc and S_SvREFCNT_dec are needed, so include
|
||||
- * "perl\lib\CORE\inline.h", after Perl_sv_free2 is defined.
|
||||
- * The linker won't complain about undefined __impl_Perl_sv_free2. */
|
||||
+ * For now, only the definitions of S_SvREFCNT_dec are needed in
|
||||
+ * "perl\lib\CORE\inline.h". */
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
-# define PL_memory_wrap "panic: memory wrap" /* Dummy */
|
||||
-# include <inline.h>
|
||||
-# undef PL_memory_wrap
|
||||
+static void
|
||||
+S_SvREFCNT_dec(pTHX_ SV *sv)
|
||||
+{
|
||||
+ if (LIKELY(sv != NULL)) {
|
||||
+ U32 rc = SvREFCNT(sv);
|
||||
+ if (LIKELY(rc > 1))
|
||||
+ SvREFCNT(sv) = rc - 1;
|
||||
+ else
|
||||
+ Perl_sv_free2(aTHX_ sv, rc);
|
||||
+ }
|
||||
+}
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -777,7 +784,7 @@ newWINrv(SV *rv, win_T *ptr)
|
||||
sv_setiv(ptr->w_perl_private, PTR2IV(ptr));
|
||||
}
|
||||
else
|
||||
- SvREFCNT_inc(ptr->w_perl_private);
|
||||
+ SvREFCNT_inc_void_NN(ptr->w_perl_private);
|
||||
SvRV(rv) = ptr->w_perl_private;
|
||||
SvROK_on(rv);
|
||||
return sv_bless(rv, gv_stashpv("VIWIN", TRUE));
|
||||
@@ -793,7 +800,7 @@ newBUFrv(SV *rv, buf_T *ptr)
|
||||
sv_setiv(ptr->b_perl_private, PTR2IV(ptr));
|
||||
}
|
||||
else
|
||||
- SvREFCNT_inc(ptr->b_perl_private);
|
||||
+ SvREFCNT_inc_void_NN(ptr->b_perl_private);
|
||||
SvRV(rv) = ptr->b_perl_private;
|
||||
SvROK_on(rv);
|
||||
return sv_bless(rv, gv_stashpv("VIBUF", TRUE));
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 24 07:12:15 UTC 2016 - idonmez@suse.com
|
||||
|
||||
- Fix build with perl 5.24 (perl-5.24.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 10 07:06:48 UTC 2016 - idonmez@suse.com
|
||||
|
||||
|
2
vim.spec
2
vim.spec
@ -90,6 +90,7 @@ Patch15: %{name}-7.4-filetype_apparmor.patch
|
||||
Patch18: %{name}-7.3-filetype_spec.patch
|
||||
Patch21: %{name}-7.3-filetype_changes.patch
|
||||
Patch22: %{name}-7.4-filetype_mine.patch
|
||||
Patch23: perl-5.24.patch
|
||||
Patch100: vim73-no-static-libpython.patch
|
||||
|
||||
%description
|
||||
@ -164,6 +165,7 @@ cp %{SOURCE23} runtime/syntax/apparmor.vim
|
||||
%patch18 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch100 -p1
|
||||
cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE8} %{SOURCE10} .
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user