Make magic vtable writable as a work-around for Coro

This commit is contained in:
Petr Písař 2015-06-18 13:27:26 +02:00
parent b60e1a2e9f
commit 017295877c
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From 4ccd57ed119eae3847df1ec241daa509f3b86ef3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 18 Jun 2015 13:19:49 +0200
Subject: [PATCH] Revert "const the core magic vtables"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit c910fead7893fe9700031ee59de6b904260b5d69.
It's necessary for Coro-6.43. This patch will be removed once Coro
will be fixed or in a reasonable time if Coro become unamaintained.
<http://www.nntp.perl.org/group/perl.perl5.porters/2015/06/msg228530.html>
<https://bugzilla.redhat.com/show_bug.cgi?id=1231165>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
perl.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/perl.h b/perl.h
index dcb184b..9bce052 100644
--- a/perl.h
+++ b/perl.h
@@ -5583,7 +5583,14 @@ EXTCONST runops_proc_t PL_runops_std
EXTCONST runops_proc_t PL_runops_dbg
INIT(Perl_runops_debug);
-#define EXT_MGVTBL EXTCONST MGVTBL
+/* PERL_GLOBAL_STRUCT_PRIVATE wants to keep global data like the
+ * magic vtables const, but this is incompatible with SWIG which
+ * does want to modify the vtables. */
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+# define EXT_MGVTBL EXTCONST MGVTBL
+#else
+# define EXT_MGVTBL EXT MGVTBL
+#endif
#define PERL_MAGIC_READONLY_ACCEPTABLE 0x40
#define PERL_MAGIC_VALUE_MAGIC 0x80
--
2.1.0

View File

@ -96,6 +96,9 @@ Patch26: perl-5.18.2-Destroy-GDBM-NDBM-ODBM-SDBM-_File-objects-only-from-
# in upstream after 5.22.0
Patch27: perl-5.22.0-make-PadlistNAMES-lvalue-again.patch
# Workaround for Coro, bug #1231165, CPAN RT#101063. To remove in the future.
Patch28: perl-5.22.0-Revert-const-the-core-magic-vtables.patch
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@ -1852,6 +1855,7 @@ Perl extension for Version Objects
%patch22 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch200 -p1
%patch201 -p1
@ -1871,6 +1875,7 @@ perl -x patchlevel.h \
'Fedora Patch22: Document Math::BigInt::CalcEmu requires Math::BigInt (CPAN RT#85015)' \
'Fedora Patch26: Make *DBM_File desctructors thread-safe (RT#61912)' \
'Fedora Patch27: Make PadlistNAMES() lvalue again (CPAN RT#101063)' \
'Fedora Patch28: Make magic vtable writable as a work-around for Coro (CPAN RT#101063)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@ -3646,6 +3651,7 @@ popd
optional (bug #1228378)
- Control building dual-lived sub-packages by perl_bootstrap macro
- Make PadlistNAMES() lvalue again (bug #1231165)
- Make magic vtable writable as a work-around for Coro (bug #1231165)
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4:5.22.0-345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild