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