Commit 771f64e7 authored by Torsten Landschoff's avatar Torsten Landschoff

Import new upstream release 3.0.11.

parent 82847eb2
......@@ -4,9 +4,16 @@ matrix:
- compiler: clang
os: linux
env: SWIGLANG=
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=
- compiler: gcc
os: linux
env: SWIGLANG=
sudo: required
dist: trusty
- os: linux
env: SWIGLANG= SWIG_CC=gcc-5 SWIG_CXX=g++-5 CPP11=1
sudo: required
......@@ -18,12 +25,18 @@ matrix:
- compiler: gcc
os: linux
env: SWIGLANG=csharp
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=d
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=go
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=go VER=1.5
......@@ -32,21 +45,31 @@ matrix:
- compiler: gcc
os: linux
env: SWIGLANG=guile
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=java
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=javascript ENGINE=node
- compiler: gcc
os: linux
env: SWIGLANG=javascript ENGINE=jsc
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=javascript ENGINE=v8
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=lua
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=lua VER=5.3
......@@ -64,69 +87,128 @@ matrix:
- compiler: gcc
os: linux
env: SWIGLANG=perl5
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=php5
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=php VER=7.0
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=php
env: SWIGLANG=php VER=7.1
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python VER=2.4
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python VER=2.5
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python VER=2.6
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python # 2.7
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python PY3=3 # 3.2
env: SWIGLANG=python PY3=3 VER=3.2
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python PY3=3 VER=3.3
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python PY3=3 VER=3.4
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python PY3=3 VER=3.5
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-builtin VER=2.6
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-builtin
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3
env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3 VER=3.4
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3 VER=3.5
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3 VER=3.5 SWIGOPTPY3=
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-O
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-classic
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=r
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=ruby
env: SWIGLANG=ruby VER=1.9.3
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=ruby VER=2.0.0
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=ruby VER=2.3.0
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=scilab
sudo: required
dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=tcl
sudo: required
dist: trusty
- os: linux
env: SWIGLANG=csharp SWIG_CC=gcc-5 SWIG_CXX=g++-5 CPP11=1
sudo: required
......@@ -151,8 +233,9 @@ matrix:
env: SWIGLANG=python SWIG_CC=gcc-6 SWIG_CXX=g++-6 CPP14=1
sudo: required
dist: trusty
- os: osx
env: SWIGLANG= SWIG_CC=gcc-4.2 SWIG_CXX=g++-4.2
- compiler: gcc
os: osx
env: SWIGLANG=
- compiler: clang
os: osx
env: SWIGLANG=
......@@ -176,7 +259,7 @@ matrix:
env: SWIGLANG=perl5
- compiler: clang
os: osx
env: SWIGLANG=php
env: SWIGLANG=php5
- compiler: clang
os: osx
env: SWIGLANG=python
......@@ -195,10 +278,14 @@ matrix:
- compiler: gcc
os: linux
env: SWIGLANG=ocaml
sudo: required
dist: trusty
# Not quite working yet
- compiler: gcc
os: linux
env: SWIGLANG=python SWIG_FEATURES=-O
sudo: required
dist: trusty
before_install:
- date -u
- uname -a
......@@ -239,6 +326,3 @@ script:
- echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
- make check-maintainer-clean && ../../configure $CONFIGOPTS
- echo -en 'travis_fold:end:script.3\\r'
branches:
only:
- master
*** ANNOUNCE: SWIG 3.0.10 (12 Jun 2016) ***
*** ANNOUNCE: SWIG 3.0.11 (29 Dec 2016) ***
http://www.swig.org
We're pleased to announce SWIG-3.0.10, the latest SWIG release.
We're pleased to announce SWIG-3.0.11, the latest SWIG release.
What is SWIG?
=============
......@@ -27,11 +27,11 @@ Availability
============
The release is available for download on Sourceforge at
http://prdownloads.sourceforge.net/swig/swig-3.0.10.tar.gz
http://prdownloads.sourceforge.net/swig/swig-3.0.11.tar.gz
A Windows version is also available at
http://prdownloads.sourceforge.net/swig/swigwin-3.0.10.zip
http://prdownloads.sourceforge.net/swig/swigwin-3.0.11.zip
Please report problems with this release to the swig-devel mailing list,
details at http://www.swig.org/mail.html.
......
......@@ -130,6 +130,7 @@ static void failed(void)
exit(1);
}
args_add_prefix(orig_args, p);
free(p);
}
if (ccache_verbose) {
......@@ -490,7 +491,9 @@ static void find_hash(ARGS *args)
/* also include the hash of the compiler name - as some compilers
use hard links and behave differently depending on the real name */
if (st.st_nlink > 1) {
hash_string(str_basename(args->argv[0]));
char *path = str_basename(args->argv[0]);
hash_string(path);
free(path);
}
hash_int(st.st_size);
......@@ -523,6 +526,7 @@ static void find_hash(ARGS *args)
input_base, tmp_string(),
i_extension);
x_asprintf(&path_stderr, "%s/tmp.cpp_stderr.%s", temp_dir, tmp_string());
free(input_base);
if (!direct_i_file) {
/* run cpp on the input file to obtain the .i */
......@@ -781,6 +785,7 @@ static void find_compiler(int argc, char **argv)
/* support user override of the compiler */
if ((path=getenv("CCACHE_CC"))) {
free(base);
base = x_strdup(path);
}
......@@ -791,8 +796,10 @@ static void find_compiler(int argc, char **argv)
stats_update(STATS_COMPILER);
cc_log("could not find compiler (%s)\n", base);
perror(base);
free(base);
exit(1);
}
free(base);
}
......@@ -1076,6 +1083,7 @@ static void process_args(int argc, char **argv)
if (strlen(p) < 2) {
cc_log("badly formed dependency file %s\n", output_file);
stats_update(STATS_ARGS);
free(default_depfile_name);
failed();
return;
}
......@@ -1093,6 +1101,7 @@ static void process_args(int argc, char **argv)
strcat(default_depfile_name, ".d");
args_add(stripped_args, "-MF");
args_add(stripped_args, default_depfile_name);
free(default_depfile_name);
}
if (!dependency_target_specified) {
......@@ -1117,6 +1126,7 @@ static void process_args(int argc, char **argv)
exit(1);
}
args_add_prefix(stripped_args, p);
free(p);
}
}
......@@ -1305,6 +1315,7 @@ static void setup_uncached_err(void)
if (putenv(buf) == -1) {
cc_log("putenv failed\n");
close(uncached_fd);
stats_update(STATS_ERROR);
failed();
}
......
......@@ -267,6 +267,7 @@ char *find_executable(const char *name, const char *exclude_name)
}
free(fname);
}
free(path);
return NULL;
#endif
......
......@@ -138,7 +138,10 @@ static void stats_update_size(enum stats stat, size_t size, size_t numfiles)
memset(counters, 0, sizeof(counters));
if (lock_fd(fd) != 0) return;
if (lock_fd(fd) != 0) {
close(fd);
return;
}
/* read in the old stats */
stats_read_fd(fd, counters);
......
......@@ -281,6 +281,7 @@ int unify_hash(const char *fname)
fd = open(fname, O_RDONLY|O_BINARY);
if (fd == -1 || fstat(fd, &st) != 0) {
cc_log("Failed to open preprocessor output %s\n", fname);
if (fd != -1) close(fd);
stats_update(STATS_PREPROCESSOR);
return -1;
}
......@@ -289,12 +290,12 @@ int unify_hash(const char *fname)
lines in preprocessor output. I have seen lines of over
100k in length, so this is well worth it */
map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (map == (char *)-1) {
cc_log("Failed to mmap %s\n", fname);
stats_update(STATS_PREPROCESSOR);
return -1;
}
close(fd);
/* pass it through the unifier */
unify((unsigned char *)map, st.st_size);
......
......@@ -189,9 +189,11 @@ void copy_fd(int fd_in, int fd_out) {
while ((n = gzread(gz_in, buf, sizeof(buf))) > 0) {
if (write(fd_out, buf, n) != n) {
gzclose(gz_in);
fatal("Failed to copy fd");
}
}
gzclose(gz_in);
}
static int _copy_file(const char *src, const char *dest, int mode) {
......@@ -248,9 +250,11 @@ static int _copy_file(const char *src, const char *dest, int mode) {
}
if (mode == COPY_TO_CACHE) {
gz_out = gzdopen(dup(fd_out), "wb");
int dup_fd_out = dup(fd_out);
gz_out = gzdopen(dup_fd_out, "wb");
if (!gz_out) {
gzclose(gz_in);
close(dup_fd_out);
close(fd_out);
free(tmp_name);
return -1;
......@@ -459,6 +463,7 @@ int create_cachedirtag(const char *dir)
f = fopen(filename, "w");
if (!f) goto error;
if (fwrite(CACHEDIR_TAG, sizeof(CACHEDIR_TAG)-1, 1, f) != 1) {
fclose(f);
goto error;
}
if (fclose(f)) goto error;
......@@ -485,7 +490,7 @@ void x_asprintf(char **ptr, const char *format, ...)
}
va_end(ap);
if (!ptr) fatal("out of memory in x_asprintf");
if (!*ptr) fatal("out of memory in x_asprintf");
}
/*
......
......@@ -2,6 +2,50 @@ SWIG (Simplified Wrapper and Interface Generator)
See the CHANGES.current file for changes in the current version.
See the RELEASENOTES file for a summary of changes in each release.
Issue # numbers mentioned below can be found on Github. For more details, add
the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 3.0.10 (12 Jun 2016)
============================
2016-06-06: mromberg
[Python] Patch #698. Add support for -relativeimport for python 2.7, so -py3 is no
longer also required for relative import support.
2016-06-05: mromberg
[Python] Patch #694 - Fix package import regressions introduced in swig-3.0.9.
1) The code in 3.0.9 did not fall back to 'import _foo' if 'import bar._foo' failed
(assuming bar.foo was the main module). Every place _foo is imported now first tries
it from the package where foo was found and if that fails tries _foo as a global module.
2) The separate block of Python code that injected code to pull in the attributes
from _foo when -builtin is used made use of the -py3 switch to either do
'from ._foo import *' or "from _foo import *". This block of code no longer does this
and instead checks the Python version at runtime to switch between the two syntaxes.
In summary, swig-3.0.10 has been modified to ease the creation of wrapper modules
that can be fully made part of a Python package. SWIG no longer
assumes the dynamically linked C module is a global module.
The dynamic module can now be placed into either the same package as the pure Python
module or as a global module. Both locations are used by the Python wrapper to
locate the C module.
However, this could cause a backwards incompatibility with some code
that was relying on the ability of "from package import _module" to
pull attributes out of the package directly. If your code populates a
module (which is also a package) with attributes that are SWIG
generated modules which were not loaded in a conventional way,
swig-3.0.8 and earlier may have worked due to 'from package import
_module' bypassing a real import and pulling your module in as an
attribute. This will no longer work. Since this is not a common (or
even recommended) practice, most folk should not be affected.
*** POTENTIAL INCOMPATIBILITY ***
2016-05-31: wsfulton
Fix #690 - Smart pointer to %ignored class doesn't expose inherited methods.
Regression introduced in swig-3.0.9.
Version 3.0.9 (29 May 2016)
===========================
......@@ -135,7 +179,7 @@ Version 3.0.9 (29 May 2016)
2016-03-01: olly
Fix isfinite() check to work with GCC6. Fixes
https://github.com/swig/swig/issues/615 reported by jplesnik.
issue #615 reported by jplesnik.
2016-02-17: olly
[Python] Add missing keywords 'as' and 'with' to pythonkw.swg.
......@@ -192,7 +236,7 @@ Version 3.0.9 (29 May 2016)
2016-01-12: olly
[Javascript] For v8 >= 4.3.0, use V8_MAJOR_VERSION.
Fixes https://github.com/swig/swig/issues/561.
Fixes issue 561.
2016-01-10: ahnolds
Improved size_t and ptrdiff_t typemaps to support large values
......
This diff is collapsed.
......@@ -280,39 +280,39 @@ actual function.
<div class="code">example_wrap.i
<pre>
... lots of SWIG internals ...
... lots of SWIG internals ...
EXPORT int ACL___fact__SWIG_0 (char *larg1) {
int lresult = (int)0 ;
char *arg1 = (char *) 0 ;
int result;
arg1 = larg1;
try {
result = (int)fact(arg1);
lresult = result;
return lresult;
} catch (...) {
return (int)0;
}
int lresult = (int)0 ;
char *arg1 = (char *) 0 ;
int result;
arg1 = larg1;
try {
result = (int)fact(arg1);
lresult = result;
return lresult;
} catch (...) {
return (int)0;
}
}
EXPORT int ACL___fact__SWIG_1 (int larg1) {
int lresult = (int)0 ;
int arg1 ;
int result;
arg1 = larg1;
try {
result = (int)fact(arg1);
lresult = result;
return lresult;
} catch (...) {
return (int)0;
}
int lresult = (int)0 ;
int arg1 ;
int result;
arg1 = larg1;
try {
result = (int)fact(arg1);
lresult = result;
return lresult;
} catch (...) {
return (int)0;
}