Make PyCObjects->PyCapsule patch C++ compatible (#627310)
Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
parent
b50aa24565
commit
6a30ada4a0
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user