[swig/f14/master] Make PyCObjects->PyCapsule patch C++ compatible (#627310)
Adam Tkac
atkac at fedoraproject.org
Fri Aug 27 08:27:14 UTC 2010
commit 6a30ada4a0ffa07bb2b341360bafc53356b7216e
Author: Adam Tkac <atkac at redhat.com>
Date: Fri Aug 27 10:26:57 2010 +0200
Make PyCObjects->PyCapsule patch C++ compatible (#627310)
Signed-off-by: Adam Tkac <atkac at redhat.com>
swig.spec | 5 ++++-
swig200-rh623854.patch | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/swig.spec b/swig.spec
index 29aa53e..2f62083 100644
--- a/swig.spec
+++ b/swig.spec
@@ -4,7 +4,7 @@
Summary: Connects C/C++/Objective C to some high-level programming languages
Name: swig
Version: 2.0.0
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv3+ and BSD
Group: Development/Tools
URL: http://swig.sourceforge.net/
@@ -115,6 +115,9 @@ rm -rf %{buildroot}
%doc Doc Examples LICENSE LICENSE-GPL LICENSE-UNIVERSITIES COPYRIGHT
%changelog
+* Fri Aug 27 2010 Adam Tkac <atkac redhat com> 2.0.0-5
+- make PyCObjects->PyCapsule patch C++ compatible (#627310)
+
* Fri Aug 20 2010 Adam Tkac <atkac redhat com> 2.0.0-4
- improve patch for #623854 (PyCObjects->PyCapsule transition)
diff --git a/swig200-rh623854.patch b/swig200-rh623854.patch
index 1b2dec8..5665252 100644
--- a/swig200-rh623854.patch
+++ b/swig200-rh623854.patch
@@ -41,7 +41,7 @@ diff -up swig-2.0.0/Lib/python/pyrun.swg.rh623854 swig-2.0.0/Lib/python/pyrun.sw
+ size_t i;
+#ifdef USE_CAPSULES
+ swig_module_info *swig_module =
-+ (swig_module_info *) PyCapsule_GetPointer(vptr, TYPE_POINTER_NAME);
++ (swig_module_info *) PyCapsule_GetPointer((PyObject *)vptr, TYPE_POINTER_NAME);
+#else
swig_module_info *swig_module = (swig_module_info *) vptr;
+#endif
@@ -56,7 +56,7 @@ diff -up swig-2.0.0/Lib/python/pyrun.swg.rh623854 swig-2.0.0/Lib/python/pyrun.sw
#endif
+#ifdef USE_CAPSULES
+ PyObject *pointer = PyCapsule_New((void *)swig_module, TYPE_POINTER_NAME,
-+ SWIG_Python_DestroyModule);
++ (PyCapsule_Destructor)SWIG_Python_DestroyModule);
+#else
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+#endif
More information about the scm-commits
mailing list