Blame SOURCES/perl-5.22.0-Revert-const-the-core-magic-vtables.patch

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