libsolv/libsolv-0.7.4-fix-for-swig-4.patch
2019-05-21 14:25:35 +02:00

30 lines
1.1 KiB
Diff

From 78e2076be0969bddf599f805985ae7bd39298c62 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 14 May 2019 11:48:28 +0200
Subject: [PATCH] Make peace with swig-4.0.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Patch by Jitka Plesníková, thanks!
---
bindings/solv.i | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bindings/solv.i b/bindings/solv.i
index 0289adb5..107192ff 100644
--- a/bindings/solv.i
+++ b/bindings/solv.i
@@ -629,8 +629,10 @@ SWIG_AsValDepId(void *obj, int *val) {
%typemap(out) disown_helper {
#if defined(SWIGRUBY)
SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 );
-#elif defined(SWIGPYTHON)
+#elif defined(SWIGPYTHON) && SWIG_VERSION < 0x040000
SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 );
+#elif defined(SWIGPYTHON)
+ SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 );
#elif defined(SWIGPERL)
SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Pool, SWIG_POINTER_DISOWN | 0 );
#elif defined(SWIGTCL)