From 5bcd22c2e693c9afbe3d7d3721edef073dcc562331e6058c8e001b5378013c6a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 27 Mar 2008 21:52:20 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swig?expand=0&rev=8 --- swig-1.3.32-testsuite-warnings.patch | 15 --------------- swig-python_disambiguate_if.patch | 25 +++++++++++++++++++++++++ swig-use_uninitialized_var.patch | 14 ++++++++++++++ swig.changes | 15 +++++++++++++++ swig.spec | 17 ++++++++++++++--- 5 files changed, 68 insertions(+), 18 deletions(-) delete mode 100644 swig-1.3.32-testsuite-warnings.patch create mode 100644 swig-python_disambiguate_if.patch create mode 100644 swig-use_uninitialized_var.patch diff --git a/swig-1.3.32-testsuite-warnings.patch b/swig-1.3.32-testsuite-warnings.patch deleted file mode 100644 index 5869bc1..0000000 --- a/swig-1.3.32-testsuite-warnings.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - Examples/test-suite/template_array_numeric.i | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- Examples/test-suite/template_array_numeric.i.orig -+++ Examples/test-suite/template_array_numeric.i -@@ -8,7 +8,7 @@ class Arrayf - float a[Len]; - public: - Arrayf() {} -- Arrayf(const float l[Len]) { }; -+ Arrayf(const float l[Len]) { memcpy((void*)a, (void*)l, sizeof(a)); }; - }; - - template diff --git a/swig-python_disambiguate_if.patch b/swig-python_disambiguate_if.patch new file mode 100644 index 0000000..4a5717e --- /dev/null +++ b/swig-python_disambiguate_if.patch @@ -0,0 +1,25 @@ +--- Lib/python/pyclasses.swg ++++ Lib/python/pyclasses.swg +@@ -74,7 +74,10 @@ + + PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) + { +- if (initial_ref) Py_XINCREF(_obj); ++ if (initial_ref) ++ { ++ Py_XINCREF(_obj); ++ } + } + + PyObject_ptr & operator=(const PyObject_ptr& item) +--- Lib/python/pycontainer.swg ++++ Lib/python/pycontainer.swg +@@ -448,7 +448,7 @@ + + ~PySequence_Cont() + { +- if (_seq) Py_DECREF(_seq); ++ if (_seq) { Py_DECREF(_seq); } + } + + size_type size() const diff --git a/swig-use_uninitialized_var.patch b/swig-use_uninitialized_var.patch new file mode 100644 index 0000000..55c0c9f --- /dev/null +++ b/swig-use_uninitialized_var.patch @@ -0,0 +1,14 @@ +--- Source/Modules/python.cxx ++++ Source/Modules/python.cxx +@@ -3400,6 +3400,11 @@ + } else { + Printf(w->code, "Swig::DirectorPureVirtualException::raise(\"Attempted to invoke pure virtual method %s::%s\");\n", SwigType_namestr(c_classname), + SwigType_namestr(name)); ++ if (!is_void) { ++ if (!(ignored_method && !pure_virtual)) { ++ Printf(w->code, "c_result = (%s)0;\n", return_type); ++ } ++ } + } + } else { + /* attach typemaps to arguments (C/C++ -> Python) */ diff --git a/swig.changes b/swig.changes index 350b227..a829328 100644 --- a/swig.changes +++ b/swig.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Mar 26 15:04:30 CET 2008 - mmarek@suse.cz + +- remove the croak patch, croak(Nullch) is correct (see + https://sourceforge.net/tracker/?func=detail&atid=301645&aid=1925121&group_id=1645) +- testsuite-warnings.patch not needed + +------------------------------------------------------------------- +Thu Mar 20 14:28:40 CET 2008 - pth@suse.de + +- define SWIG_croak_null as croak("%s","") not croak(Nullch) + as croak is defined to take a string constant as 1st arg. +- Don't return an unitialized local variable in template code. +- Bracket if clauses so that the compiler doesn't warn in template code. + ------------------------------------------------------------------- Fri Feb 29 14:21:25 CET 2008 - mmarek@suse.cz diff --git a/swig.spec b/swig.spec index cdbae5b..3c55292 100644 --- a/swig.spec +++ b/swig.spec @@ -19,9 +19,10 @@ Group: Development/Languages/C and C++ AutoReqProv: on Summary: Simplified Wrapper and Interface Generator Version: 1.3.34 -Release: 2 +Release: 8 Source: swig-%{version}.tar.bz2 -Patch2: swig-1.3.32-testsuite-warnings.patch +Patch4: swig-use_uninitialized_var.patch +Patch5: swig-python_disambiguate_if.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -90,7 +91,8 @@ Authors: %prep %setup -q -%patch2 +%patch4 +%patch5 %build v1=$(awk '/^# Generated by GNU Autoconf / { print $6; exit; }' configure) @@ -146,6 +148,15 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/swig %changelog +* Wed Mar 26 2008 mmarek@suse.cz +- remove the croak patch, croak(Nullch) is correct (see + https://sourceforge.net/tracker/?func=detail&atid=301645&aid=1925121&group_id=1645) +- testsuite-warnings.patch not needed +* Thu Mar 20 2008 pth@suse.de +- define SWIG_croak_null as croak("%%s","") not croak(Nullch) + as croak is defined to take a string constant as 1st arg. +- Don't return an unitialized local variable in template code. +- Bracket if clauses so that the compiler doesn't warn in template code. * Fri Feb 29 2008 mmarek@suse.cz - updated to 1.3.34 + shared_ptr support for Python