- Update to 2.0.8

* Fix a couple of regressions introduced in 2.0.5 and 2.0.7.
  * Improved using declarations and using directives support.
  * Minor fixes/enhancements for C#, Java, Octave, Perl and Python.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=41
This commit is contained in:
Klaus Kämpf 2012-11-04 21:54:18 +00:00 committed by Git OBS Bridge
parent a6c8e61024
commit e2dfc111bd
6 changed files with 50 additions and 107 deletions

View File

@ -1,25 +1,7 @@
From 9ef1a68a4428fbbba900a1c8ab162fe6fd6ce299 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Sat, 26 May 2012 18:21:22 +0200
Subject: [PATCH 01/10] Ruby: replace obsolete STR2CSTR macro with
StringValuePtr
---
Doc/Manual/Ruby.html | 8 ++++----
Doc/Manual/SWIGDocumentation.html | 8 ++++----
Examples/ruby/hashargs/example.i | 2 +-
Examples/ruby/multimap/example.i | 6 +++---
Examples/test-suite/memberin1.i | 2 +-
Examples/test-suite/namespace_typemap.i | 2 +-
Lib/ruby/argcargv.i | 2 +-
Lib/ruby/rubystrings.swg | 6 +++---
8 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/Doc/Manual/Ruby.html b/Doc/Manual/Ruby.html
index 69005c7..775caaa 100644
--- a/Doc/Manual/Ruby.html
+++ b/Doc/Manual/Ruby.html
@@ -4925,7 +4925,7 @@ arguments. For example: </p>
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Doc/Manual/Ruby.html ./Doc/Manual/Ruby.html
--- ../orig-swig-2.0.8/Doc/Manual/Ruby.html 2012-08-20 23:29:52.000000000 +0200
+++ ./Doc/Manual/Ruby.html 2012-11-04 22:52:17.837133265 +0100
@@ -4926,7 +4926,7 @@
<div class="code">
@ -28,7 +10,7 @@ index 69005c7..775caaa 100644
@@ -7134,7 +7134,7 @@ Ruby_Format_TypeError( "$1_name", "$1_type","$symname", $argnum, $input
@@ -7135,7 +7135,7 @@
</tr>
<tr>
@ -37,7 +19,7 @@ index 69005c7..775caaa 100644
<td style="font-family: monospace;">SWIG_AsCharPtrAndSize(VALUE, char*, size_t, int* alloc)</td>
</tr>
@@ -7517,7 +7517,7 @@ Array instance to be used as a <tt>char **</tt> object. </p>
@@ -7518,7 +7518,7 @@
<div class="code">
@ -46,7 +28,7 @@ index 69005c7..775caaa 100644
@@ -7795,7 +7795,7 @@ equivalents and store them in our local C arrays: </p>
@@ -7796,7 +7796,7 @@
<div class="code">
@ -55,11 +37,10 @@ index 69005c7..775caaa 100644
diff --git a/Doc/Manual/SWIGDocumentation.html b/Doc/Manual/SWIGDocumentation.html
index 85100fa..42f84c5 100644
--- a/Doc/Manual/SWIGDocumentation.html
+++ b/Doc/Manual/SWIGDocumentation.html
@@ -46771,7 +46771,7 @@ const int</TT>. In addition, the typemap system follows <TT>typedef</TT>
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Doc/Manual/SWIGDocumentation.html ./Doc/Manual/SWIGDocumentation.html
--- ../orig-swig-2.0.8/Doc/Manual/SWIGDocumentation.html 2012-08-20 23:29:55.000000000 +0200
+++ ./Doc/Manual/SWIGDocumentation.html 2012-11-04 22:52:17.849132571 +0100
@@ -46795,7 +46795,7 @@
example:</P>
<DIV class="code">
<PRE>%typemap(in) (char *str, int len) {
@ -68,7 +49,7 @@ index 85100fa..42f84c5 100644
<BR> $2 = (int) RSTRING($input)-&gt;len;
<BR>};
<BR>
@@ -47405,7 +47405,7 @@ style="font-family: monospace;">SWIG_AsVal_unsigned_SS_long(VALUE,
@@ -47429,7 +47429,7 @@
unsigned long*)</TD></TR>
<TR><TD style="font-family: monospace;">char NUM2CHR(Numeric or String)</TD><TD
style="font-family: monospace;">SWIG_AsVal_char(VALUE, int*)</TD></TR>
@ -77,7 +58,7 @@ index 85100fa..42f84c5 100644
SWIG_AsCharPtrAndSize(VALUE, char*, size_t, int* alloc)</TD></TR>
<TR><TD style="font-family: monospace;">char * rb_str2cstr(String,
int*length)</TD><TD style="font-family: monospace;"></TD></TR>
@@ -47518,7 +47518,7 @@ printf()</TT>.</DIV>
@@ -47542,7 +47542,7 @@
<BR> VALUE *ptr = RARRAY($input)-&gt;ptr;
<BR> for (i=0; i &lt; size; i++, ptr++)
<BR> /* Convert Ruby Object String to char* */
@ -86,7 +67,7 @@ index 85100fa..42f84c5 100644
<BR> $1[i]=NULL; /* End of list */
<BR>}
<BR>
@@ -47732,7 +47732,7 @@ NULL</TT> and set the stage for extracting the keys and values from the
@@ -47756,7 +47756,7 @@
<BR> val = rb_hash_aref($input, key);
<BR> Check_Type(key, T_STRING);
<BR> Check_Type(val, T_FIXNUM);
@ -95,10 +76,9 @@ index 85100fa..42f84c5 100644
<BR> $3[i] = NUM2INT(val);</B>
<BR>}
<BR>}
diff --git a/Examples/ruby/hashargs/example.i b/Examples/ruby/hashargs/example.i
index 159bbd3..10e209e 100644
--- a/Examples/ruby/hashargs/example.i
+++ b/Examples/ruby/hashargs/example.i
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/ruby/hashargs/example.i ./Examples/ruby/hashargs/example.i
--- ../orig-swig-2.0.8/Examples/ruby/hashargs/example.i 2008-11-26 22:54:49.000000000 +0100
+++ ./Examples/ruby/hashargs/example.i 2012-11-04 22:52:17.849132571 +0100
@@ -14,7 +14,7 @@
val = rb_hash_aref($input, key);
Check_Type(key, T_STRING);
@ -108,11 +88,10 @@ index 159bbd3..10e209e 100644
$3[i] = NUM2INT(val);
}
}
diff --git a/Examples/ruby/multimap/example.i b/Examples/ruby/multimap/example.i
index f68422a..34f0b89 100644
--- a/Examples/ruby/multimap/example.i
+++ b/Examples/ruby/multimap/example.i
@@ -31,7 +31,7 @@ extern int gcd(int x, int y);
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/ruby/multimap/example.i ./Examples/ruby/multimap/example.i
--- ../orig-swig-2.0.8/Examples/ruby/multimap/example.i 2010-02-13 18:12:15.000000000 +0100
+++ ./Examples/ruby/multimap/example.i 2012-11-04 22:52:17.853132339 +0100
@@ -31,7 +31,7 @@
free($2);
SWIG_exception(SWIG_ValueError, "List items must be strings");
}
@ -121,7 +100,7 @@ index f68422a..34f0b89 100644
}
$2[i] = 0;
}
@@ -46,7 +46,7 @@ extern int gcdmain(int argc, char *argv[]);
@@ -46,7 +46,7 @@
if (TYPE($input) != T_STRING) {
SWIG_exception(SWIG_ValueError, "Expected a string");
}
@ -130,7 +109,7 @@ index f68422a..34f0b89 100644
$2 = RSTRING_LEN($input);
}
@@ -60,7 +60,7 @@ extern int count(char *bytes, int len, char c);
@@ -60,7 +60,7 @@
if (TYPE($input) != T_STRING) {
SWIG_exception(SWIG_ValueError,"Expected a string");
}
@ -139,11 +118,10 @@ index f68422a..34f0b89 100644
$2 = RSTRING_LEN($input);
$1 = (char *) malloc($2+1);
memmove($1,temp,$2);
diff --git a/Examples/test-suite/memberin1.i b/Examples/test-suite/memberin1.i
index 9203230..ece489e 100644
--- a/Examples/test-suite/memberin1.i
+++ b/Examples/test-suite/memberin1.i
@@ -47,7 +47,7 @@ public:
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/test-suite/memberin1.i ./Examples/test-suite/memberin1.i
--- ../orig-swig-2.0.8/Examples/test-suite/memberin1.i 2002-11-30 23:01:28.000000000 +0100
+++ ./Examples/test-suite/memberin1.i 2012-11-04 22:52:17.853132339 +0100
@@ -47,7 +47,7 @@
#ifdef SWIGRUBY
%typemap(in) String {
Check_Type($input, T_STRING);
@ -152,11 +130,10 @@ index 9203230..ece489e 100644
}
#endif
diff --git a/Examples/test-suite/namespace_typemap.i b/Examples/test-suite/namespace_typemap.i
index f25f885..8ead78c 100644
--- a/Examples/test-suite/namespace_typemap.i
+++ b/Examples/test-suite/namespace_typemap.i
@@ -100,7 +100,7 @@ namespace test {
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Examples/test-suite/namespace_typemap.i ./Examples/test-suite/namespace_typemap.i
--- ../orig-swig-2.0.8/Examples/test-suite/namespace_typemap.i 2010-06-15 21:40:34.000000000 +0200
+++ ./Examples/test-suite/namespace_typemap.i 2012-11-04 22:52:17.853132339 +0100
@@ -100,7 +100,7 @@
#endif
#ifdef SWIGRUBY
%typemap(in) string_class * {
@ -165,10 +142,9 @@ index f25f885..8ead78c 100644
}
%typemap(freearg) string_class * {
delete $1;
diff --git a/Lib/ruby/argcargv.i b/Lib/ruby/argcargv.i
index ae1f6bb..fc0bc40 100644
--- a/Lib/ruby/argcargv.i
+++ b/Lib/ruby/argcargv.i
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Lib/ruby/argcargv.i ./Lib/ruby/argcargv.i
--- ../orig-swig-2.0.8/Lib/ruby/argcargv.i 2006-09-23 23:39:09.000000000 +0200
+++ ./Lib/ruby/argcargv.i 2012-11-04 22:52:17.853132339 +0100
@@ -30,7 +30,7 @@
$2 = (char **) malloc((size+1)*sizeof(char *));
VALUE *ptr = RARRAY_PTR($input);
@ -178,11 +154,10 @@ index ae1f6bb..fc0bc40 100644
}
$2[i]=NULL;
} else {
diff --git a/Lib/ruby/rubystrings.swg b/Lib/ruby/rubystrings.swg
index e6b92ef..8600949 100644
--- a/Lib/ruby/rubystrings.swg
+++ b/Lib/ruby/rubystrings.swg
@@ -7,10 +7,10 @@ SWIGINTERN int
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-swig-2.0.8/Lib/ruby/rubystrings.swg ./Lib/ruby/rubystrings.swg
--- ../orig-swig-2.0.8/Lib/ruby/rubystrings.swg 2007-04-28 06:20:28.000000000 +0200
+++ ./Lib/ruby/rubystrings.swg 2012-11-04 22:52:17.853132339 +0100
@@ -7,10 +7,10 @@
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
{
if (TYPE(obj) == T_STRING) {
@ -196,6 +171,3 @@ index e6b92ef..8600949 100644
%#endif
size_t size = RSTRING_LEN(obj) + 1;
if (cptr) {
--
1.7.9.2

View File

@ -1,34 +0,0 @@
From aa7b4489f8336647edb08a30f7ab95b7e675806d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Sun, 27 May 2012 15:28:45 +0200
Subject: [PATCH] Fix call to Swig_name_decl (upstream ID 3530078)
---
Source/Modules/lang.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx
index 8fb5069..b7ce502 100644
--- a/Source/Modules/lang.cxx
+++ b/Source/Modules/lang.cxx
@@ -2623,7 +2623,7 @@ int Language::constructorDeclaration(Node *n) {
Delete(expected_name_resolved);
}
if (illegal_name) {
- Swig_warning(WARN_LANG_RETURN_TYPE, input_file, line_number, "Function %s must have a return type. Ignored.\n", Swig_name_decl(name));
+ Swig_warning(WARN_LANG_RETURN_TYPE, input_file, line_number, "Function %s must have a return type. Ignored.\n", Swig_name_decl(n));
Swig_restore(n);
return SWIG_NOWRAP;
}
@@ -2760,7 +2760,7 @@ int Language::destructorDeclaration(Node *n) {
}
if (illegal_name) {
- Swig_warning(WARN_LANG_ILLEGAL_DESTRUCTOR, input_file, line_number, "Illegal destructor name %s. Ignored.\n", Swig_name_decl(name));
+ Swig_warning(WARN_LANG_ILLEGAL_DESTRUCTOR, input_file, line_number, "Illegal destructor name %s. Ignored.\n", Swig_name_decl(n));
Swig_restore(n);
Delete(expected_name);
return SWIG_NOWRAP;
--
1.7.9.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac1f29be405d78b3848c8ba76add2deffc2cdc166c9a1773eda7972ba3898967
size 5281076

3
swig-2.0.8.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aeeefa20bbe1c03bacf23f0af9e7d6193e8b807b7585470615b71b1ee0c8ca4f
size 5291361

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sun Nov 4 21:21:01 UTC 2012 - kkaempf@suse.com
- Update to 2.0.8
* Fix a couple of regressions introduced in 2.0.5 and 2.0.7.
* Improved using declarations and using directives support.
* Minor fixes/enhancements for C#, Java, Octave, Perl and Python.
-------------------------------------------------------------------
Sun May 27 13:31:49 UTC 2012 - kkaempf@suse.com

View File

@ -17,7 +17,7 @@
Name: swig
Version: 2.0.7
Version: 2.0.8
Release: 0
Summary: Simplified Wrapper and Interface Generator
License: GPL-3.0+ and BSD-3-Clause
@ -39,8 +39,6 @@ Patch4: 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch
Patch5: 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch
Patch6: 0008-Ruby-Disable-broken-tests.patch
Patch7: 0012-Python-Disable-broken-test-in-threads_exception.patch
# PATCH-FIXED-UPSTREAM - ID 3530078
Patch8: 0013-Fix-call-to-Swig_name_decl-upstream-ID-3530078.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: boost-devel
@ -141,7 +139,6 @@ understandig SWIG usage.
%patch6 -p1
%patch7 -p1
%endif
%patch8 -p1
%build
sh autogen.sh