Merge branch 'master' into C

Merge with the latest master to resolve (trivial) conflict in the
GitHub workflow file.
This commit is contained in:
Vadim Zeitlin 2021-11-26 20:32:36 +01:00
commit c3b262c2f7
60 changed files with 531 additions and 282 deletions

View file

@ -2,46 +2,45 @@ name: CI
on: on:
push: push:
branches: master
paths-ignore: paths-ignore:
- 'CHANGES*' - 'CHANGES*'
- 'Doc/**' - 'Doc/**'
- 'appveyor.yml'
pull_request: pull_request:
branches: master branches: master
paths-ignore: paths-ignore:
- 'CHANGES*' - 'CHANGES*'
- 'Doc/**' - 'Doc/**'
- 'appveyor.yml'
jobs: jobs:
build: build:
# When continue-on-error is true for an individual build, that build can fail (it'll show red),
# but it won't fail the overall build
continue-on-error: ${{ matrix.continue-on-error || false }}
runs-on: ${{ matrix.os || 'ubuntu-20.04' }} runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
# By default, the name of the build is just the language used, but matrix # By default, the name of the build is the language used and SWIG options.
# entries can define the additional "desc" field with any additional name: ${{ matrix.SWIGLANG || 'none' }}${{ matrix.PY3 }} ${{ matrix.ENGINE}} ${{ matrix.VER }} ${{ matrix.SWIG_FEATURES }} ${{ (matrix.compiler || 'gcc') }}${{ matrix.GCC }} ${{ matrix.CPPSTD }} ${{ matrix.CSTD }} ${{ matrix.continue-on-error && '(can fail)' }}
# information to include in the name.
name: ${{ matrix.SWIGLANG || 'none' }}${{ matrix.PY3 }} ${{ matrix.ENGINE}} ${{ matrix.VER }} ${{ matrix.desc }}
strategy: strategy:
matrix: matrix:
include: include:
- SWIGLANG: "" - SWIGLANG: ""
desc: gcc
- SWIGLANG: "" - SWIGLANG: ""
GCC: 7 GCC: 7
desc: gcc7
- SWIGLANG: "" - SWIGLANG: ""
GCC: 8 GCC: 8
desc: gcc8
- SWIGLANG: "" - SWIGLANG: ""
GCC: 9 GCC: 9
desc: gcc9
- SWIGLANG: "" - SWIGLANG: ""
GCC: 10 GCC: 10
desc: gcc10 - SWIGLANG: ""
GCC: 11
- SWIGLANG: "" - SWIGLANG: ""
compiler: clang compiler: clang
desc: clang
- SWIGLANG: c - SWIGLANG: c
CPP11: 1 CPP11: 1
- SWIGLANG: csharp - SWIGLANG: csharp
@ -54,32 +53,30 @@ jobs:
# - SWIGLANG: d # - SWIGLANG: d
# VER: '2.066.0' # VER: '2.066.0'
# os: ubuntu-18.04 # This dlang version doesn't work under 20.04. # os: ubuntu-18.04 # This dlang version doesn't work under 20.04.
- SWIGLANG: go
VER: '1.3'
- SWIGLANG: go - SWIGLANG: go
VER: '1.6' VER: '1.6'
CSTD: gnu11
- SWIGLANG: go - SWIGLANG: go
VER: '1.8' VER: '1.8'
- SWIGLANG: go - SWIGLANG: go
VER: '1.12' VER: '1.12'
CSTD: gnu99 CSTD: gnu11
- SWIGLANG: go - SWIGLANG: go
VER: '1.16' VER: '1.17'
CSTD: gnu99
- SWIGLANG: guile - SWIGLANG: guile
- SWIGLANG: java - SWIGLANG: java
- SWIGLANG: javascript - SWIGLANG: javascript
ENGINE: node ENGINE: node
VER: '12' VER: '12'
CPP11: 1 CPPSTD: c++11
- SWIGLANG: javascript - SWIGLANG: javascript
ENGINE: node ENGINE: node
VER: '14' VER: '14'
CPP11: 1 CPPSTD: c++11
- SWIGLANG: javascript - SWIGLANG: javascript
ENGINE: node ENGINE: node
VER: '16' VER: '16'
CPP14: 1 CPPSTD: c++14
- SWIGLANG: javascript - SWIGLANG: javascript
ENGINE: jsc ENGINE: jsc
os: ubuntu-18.04 # libwebkitgtk-dev dependency not available in 20.04. os: ubuntu-18.04 # libwebkitgtk-dev dependency not available in 20.04.
@ -90,12 +87,11 @@ jobs:
- SWIGLANG: lua - SWIGLANG: lua
VER: '5.3' VER: '5.3'
- SWIGLANG: octave - SWIGLANG: octave
CPP11: 1 CPPSTD: c++11
- SWIGLANG: perl5 - SWIGLANG: perl5
- SWIGLANG: php - SWIGLANG: php
VER: '7.4' VER: '7.4'
- SWIGLANG: php - SWIGLANG: php
VER: '8.0'
- SWIGLANG: python - SWIGLANG: python
- SWIGLANG: python - SWIGLANG: python
PY3: 3 PY3: 3
@ -124,20 +120,19 @@ jobs:
- SWIGLANG: python - SWIGLANG: python
PY3: 3 PY3: 3
VER: '3.9' VER: '3.9'
- SWIGLANG: python
PY3: 3
VER: '3.10'
- SWIGLANG: python - SWIGLANG: python
SWIG_FEATURES: -builtin SWIG_FEATURES: -builtin
desc: builtin
- SWIGLANG: python - SWIGLANG: python
SWIG_FEATURES: -builtin -O SWIG_FEATURES: -builtin -O
desc: builtin optimized
- SWIGLANG: python - SWIGLANG: python
PY3: 3 PY3: 3
SWIG_FEATURES: -builtin SWIG_FEATURES: -builtin
desc: builtin
- SWIGLANG: python - SWIGLANG: python
PY3: 3 PY3: 3
SWIG_FEATURES: -builtin -O SWIG_FEATURES: -builtin -O
desc: builtin optimized
- SWIGLANG: r - SWIGLANG: r
- SWIGLANG: ruby - SWIGLANG: ruby
VER: '1.9' VER: '1.9'
@ -164,10 +159,139 @@ jobs:
VER: '2.7' VER: '2.7'
- SWIGLANG: ruby - SWIGLANG: ruby
VER: '3.0' VER: '3.0'
CSTD: c99 CPPSTD: c++11
CPP11: 1 - SWIGLANG: scilab
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
- SWIGLANG: tcl - SWIGLANG: tcl
# let's run all of them, as opposed to aborting when one fails # c++11 testing
- SWIGLANG: csharp
CPPSTD: c++11
- SWIGLANG: go
VER: '1.17'
CPPSTD: c++11
CSTD: gnu11
- SWIGLANG: guile
CPPSTD: c++11
- SWIGLANG: java
CPPSTD: c++11
- SWIGLANG: javascript
ENGINE: node
VER: '14'
CPPSTD: c++11
- SWIGLANG: lua
CPPSTD: c++11
# - SWIGLANG: octave
# CPPSTD: c++11
- SWIGLANG: perl5
CPPSTD: c++11
- SWIGLANG: php
CPPSTD: c++11
CSTD: gnu11
- SWIGLANG: python
CPPSTD: c++11
PY3: 3
- SWIGLANG: r
CPPSTD: c++11
- SWIGLANG: ruby
CPPSTD: c++11
- SWIGLANG: scilab
CPPSTD: c++11
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
- SWIGLANG: tcl
CPPSTD: c++11
# c++14 testing
- SWIGLANG: csharp
CPPSTD: c++14
- SWIGLANG: go
VER: '1.17'
CPPSTD: c++14
CSTD: gnu11
- SWIGLANG: guile
CPPSTD: c++14
- SWIGLANG: java
CPPSTD: c++14
- SWIGLANG: javascript
ENGINE: node
VER: '16'
CPPSTD: c++14
- SWIGLANG: lua
CPPSTD: c++14
- SWIGLANG: octave
CPPSTD: c++14
- SWIGLANG: perl5
CPPSTD: c++14
- SWIGLANG: php
CPPSTD: c++14
CSTD: gnu11
- SWIGLANG: python
CPPSTD: c++14
PY3: 3
- SWIGLANG: r
CPPSTD: c++14
- SWIGLANG: ruby
CPPSTD: c++14
- SWIGLANG: scilab
CPPSTD: c++14
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
- SWIGLANG: tcl
CPPSTD: c++14
# c++17 testing (using gcc11)
- SWIGLANG: csharp
CPPSTD: c++17
GCC: 11
- SWIGLANG: go
VER: '1.17'
CPPSTD: c++17
GCC: 11
CSTD: gnu17
- SWIGLANG: guile
CPPSTD: c++17
GCC: 11
- SWIGLANG: java
CPPSTD: c++17
GCC: 11
- SWIGLANG: javascript
ENGINE: node
VER: '16'
CPPSTD: c++17
GCC: 11
- SWIGLANG: lua
CPPSTD: c++17
GCC: 11
- SWIGLANG: octave
CPPSTD: c++17
GCC: 11
- SWIGLANG: perl5
CPPSTD: c++17
GCC: 11
- SWIGLANG: php
CPPSTD: c++17
CSTD: gnu17
GCC: 11
- SWIGLANG: python
CPPSTD: c++17
GCC: 11
PY3: 3
- SWIGLANG: r
CPPSTD: c++17
GCC: 11
- SWIGLANG: ruby
CPPSTD: c++17
GCC: 11
- SWIGLANG: scilab
CPPSTD: c++17
GCC: 11
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
- SWIGLANG: tcl
CPPSTD: c++17
GCC: 11
# Experimental languages (these are allowed to fail)
- SWIGLANG: mzscheme
continue-on-error: true
- SWIGLANG: ocaml
continue-on-error: true
os: ubuntu-18.04 # ocaml-4.08 in ubuntu-20.04 not yet working
# Run all of them, as opposed to aborting when one fails
fail-fast: false fail-fast: false
env: env:
@ -176,10 +300,9 @@ jobs:
VER: ${{ matrix.VER }} VER: ${{ matrix.VER }}
ENGINE: ${{ matrix.ENGINE }} ENGINE: ${{ matrix.ENGINE }}
SWIG_FEATURES: ${{ matrix.SWIG_FEATURES }} SWIG_FEATURES: ${{ matrix.SWIG_FEATURES }}
GCC: ${{ matrix.GCC }}
CSTD: ${{ matrix.CSTD }} CSTD: ${{ matrix.CSTD }}
CPP11: ${{ matrix.CPP11 }} CPPSTD: ${{ matrix.CPPSTD }}
CPP14: ${{ matrix.CPP14 }}
CPP17: ${{ matrix.CPP17 }}
steps: steps:
- name: Checkout - name: Checkout
@ -192,13 +315,32 @@ jobs:
with: with:
key: ${{ matrix.os || 'ubuntu-20.04' }}-${{ matrix.compiler || 'gcc' }}${{ matrix.GCC }} key: ${{ matrix.os || 'ubuntu-20.04' }}-${{ matrix.compiler || 'gcc' }}${{ matrix.GCC }}
- name: Configure - name: Install Dependencies
run: | run: |
set -x set -x
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
echo PATH="$PATH" >> $GITHUB_ENV echo PATH="$PATH" >> $GITHUB_ENV
source Tools/GHA-linux-install.sh source $GITHUB_WORKSPACE/Tools/GHA-linux-install.sh
echo WITHLANG="$WITHLANG" >> $GITHUB_ENV
case $(uname) in
Linux)
cpu_count=$(nproc)
;;
Darwin)
cpu_count=$(sysctl -n hw.ncpu)
;;
*)
cpu_count=1
;;
esac
if [[ $cpu_count != 1 ]]; then
echo SWIGJOBS=-j$cpu_count >> $GITHUB_ENV
fi
if test '${{ matrix.compiler }}' = 'clang'; then if test '${{ matrix.compiler }}' = 'clang'; then
CC="clang" CC="clang"
@ -219,88 +361,76 @@ jobs:
echo CC="$CC" >> $GITHUB_ENV echo CC="$CC" >> $GITHUB_ENV
echo CXX="$CXX" >> $GITHUB_ENV echo CXX="$CXX" >> $GITHUB_ENV
echo "Compiler used:"
ls -la $(which $CC) $(which $CXX) ls -la $(which $CC) $(which $CXX)
$CC --version $CC --version
$CXX --version $CXX --version
if test -n '${{ matrix.CONFIGOPTS }}'; then - name: Configure
CONFIGOPTS=${{ matrix.CONFIGOPTS }} run: |
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
set -x
if [[ -z "$CSTD" ]]; then
case "$CPPSTD" in
c++11) export CSTD=c11 ;;
c++14) export CSTD=c11 ;;
c++17) export CSTD=c17 ;;
esac
echo CSTD="$CSTD" >> $GITHUB_ENV
fi fi
if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++11 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS") && export CSTD=c11 && export CPPSTD=c++11; fi if test -n "$CPPSTD"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=$CPPSTD $CXXFLAGS"); fi
if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++14 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS") && export CSTD=c11 && export CPPSTD=c++14; fi if test -n "$CSTD"; then CONFIGOPTS+=("CFLAGS=-std=$CSTD $CFLAGS"); fi
if test -n "$CPP17"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++17 $CXXFLAGS" "CFLAGS=-std=c17 $CFLAGS") && export CSTD=c17 && export CPPSTD=c++17; fi
if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$WITHLANG); fi if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$WITHLANG); fi
echo "${CONFIGOPTS[@]}" echo "${CONFIGOPTS[@]}"
./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}" ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
case $(uname) in
Linux)
cpu_count=$(nproc)
;;
Darwin)
cpu_count=$(sysctl -n hw.ncpu)
;;
*)
cpu_count=1
;;
esac
if [[ $cpu_count != 1 ]]; then
echo SWIGJOBS=-j$cpu_count >> $GITHUB_ENV
fi
- name: Build - name: Build
working-directory: build/build working-directory: build/build
run: | run: |
set -x set -x
make $SWIGJOBS make -s $SWIGJOBS
./swig -version && ./swig -pcreversion ./swig -version && ./swig -pcreversion
if test -z "$SWIGLANG"; then make $SWIGJOBS check-ccache; fi
if test -z "$SWIGLANG"; then make $SWIGJOBS check-errors-test-suite; fi
echo 'Installing...'
if test -z "$SWIGLANG"; then sudo make install && swig -version && ccache-swig -V; fi
- name: Test - name: Test
working-directory: build/build working-directory: build/build
run: | run: |
case "$SWIGLANG" in source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
javascript)
case "$ENGINE" in
node)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm use ${VER}
;;
*)
# Running tests using v8 or jsc involves creating a custom
# interpreter in Tools/javascript, which is currently broken
# for parallel builds (we attempt to update this interpreter
# while running, resulting in "Text file busy" error).
unset SWIGJOBS
esac
;;
ruby)
source $HOME/.rvm/scripts/rvm
;;
esac
set -x set -x
if test -n "$CPP11"; then export CPPSTD=c++11; fi
if test -n "$CPP14"; then export CPPSTD=c++14; fi if test -z "$SWIGLANG"; then
if test -n "$CPP17"; then export CPPSTD=c++17; fi make $SWIGJOBS check-ccache
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic. make $SWIGJOBS check-errors-test-suite
if test -n "$SWIGLANG"; then cflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cflags --std=$CSTD --compiler=$CC) && echo $cflags; fi else
if test -n "$SWIGLANG"; then cxxflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cxxflags --std=$CPPSTD --compiler=$CC) && echo $cxxflags; fi case "$SWIGLANG" in
if test -n "$SWIGLANG"; then make check-$SWIGLANG-version; fi javascript)
if test -n "$SWIGLANG"; then make check-$SWIGLANG-enabled; fi case "$ENGINE" in
if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-examples CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi v8 | jsc)
if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-test-suite CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi # Running tests using v8 or jsc involves creating a custom
# interpreter in Tools/javascript, which is currently broken
# for parallel builds (we attempt to update this interpreter
# while running, resulting in "Text file busy" error).
unset SWIGJOBS
esac
;;
esac
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
cflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cflags --std=$CSTD --compiler=$CC) && echo $cflags
cxxflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cxxflags --std=$CPPSTD --compiler=$CC) && echo $cxxflags
make check-$SWIGLANG-version
make check-$SWIGLANG-enabled
make $SWIGJOBS check-$SWIGLANG-examples CFLAGS="$cflags" CXXFLAGS="$cxxflags"
make $SWIGJOBS check-$SWIGLANG-test-suite CFLAGS="$cflags" CXXFLAGS="$cxxflags"
fi
- name: Install
working-directory: build/build
run: |
set -x
if test -z "$SWIGLANG"; then sudo make install && swig -version && ccache-swig -V; fi
- name: Clean - name: Clean
working-directory: build/build working-directory: build/build
run: | run: |
set -x set -x
make check-maintainer-clean && ../../configure $CONFIGOPTS make check-maintainer-clean && ../../configure

View file

@ -2,7 +2,7 @@ This directory contains a version of ccache. The initial version was based on cc
debian patches 01-02, 04-14, see the debian/patches subdirectory. The ccache-win32-2.4 modifications debian patches 01-02, 04-14, see the debian/patches subdirectory. The ccache-win32-2.4 modifications
to ccache-2.4 have also been merged in. to ccache-2.4 have also been merged in.
Changes have been made to support cacheing the output from SWIG. The ability to cache c/c++ compiler Changes have been made to support caching the output from SWIG. The ability to cache c/c++ compiler
output has been retained. output has been retained.
Additional features added are the CCACHE_VERBOSE and CCACHE_SWIG environment variables, see docs. Additional features added are the CCACHE_VERBOSE and CCACHE_SWIG environment variables, see docs.

View file

@ -137,7 +137,7 @@ int execute(char **argv,
_dup2(fd, 2); _dup2(fd, 2);
_close(fd); _close(fd);
/* Spawn process (_exec* familly doesn't return) */ /* Spawn process (_exec* family doesn't return) */
status = _spawnv(_P_WAIT, argv[0], (const char **)argv); status = _spawnv(_P_WAIT, argv[0], (const char **)argv);
/* Restore descriptors */ /* Restore descriptors */

View file

@ -16,7 +16,7 @@
* for string length. This covers a nasty loophole. * for string length. This covers a nasty loophole.
* *
* The other functions are there to prevent NULL pointers from * The other functions are there to prevent NULL pointers from
* causing nast effects. * causing nasty effects.
* *
* More Recently: * More Recently:
* Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43 * Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43
@ -30,7 +30,7 @@
* probably requires libm on most operating systems. Don't yet * probably requires libm on most operating systems. Don't yet
* support the exponent (e,E) and sigfig (g,G). Also, fmtint() * support the exponent (e,E) and sigfig (g,G). Also, fmtint()
* was pretty badly broken, it just wasn't being exercised in ways * was pretty badly broken, it just wasn't being exercised in ways
* which showed it, so that's been fixed. Also, formated the code * which showed it, so that's been fixed. Also, formatted the code
* to mutt conventions, and removed dead code left over from the * to mutt conventions, and removed dead code left over from the
* original. Also, there is now a builtin-test, just compile with: * original. Also, there is now a builtin-test, just compile with:
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm

View file

@ -34,7 +34,7 @@ on the new options.<p>
You can get this release from the <a href="http://ccache.samba.org/ftp/ccache/">download directory</a> You can get this release from the <a href="http://ccache.samba.org/ftp/ccache/">download directory</a>
<p>NOTE! This release changes the hash input slighly, so you will <p>NOTE! This release changes the hash input slightly, so you will
probably find that you will not get any hits against your existing probably find that you will not get any hits against your existing
cache when you upgrade. cache when you upgrade.

View file

@ -7,6 +7,11 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.1.0 (in progress) Version 4.1.0 (in progress)
=========================== ===========================
2021-11-12: wsfulton
[Javascript] v8 and node only. Fix mismatched new char[] and free()
when wrapping C code char arrays. Now calloc is now used instead of
new char[] in SWIG_AsCharPtrAndSize.
2021-10-03: ajrh1 2021-10-03: ajrh1
[Perl] #2074: Avoid -Wmisleading-indentation in generated code [Perl] #2074: Avoid -Wmisleading-indentation in generated code
when using gcc11. when using gcc11.

View file

@ -1354,7 +1354,7 @@ Here is the list of all Doxygen tags and the description of how they are transla
</tr> </tr>
<tr> <tr>
<td>\throws</td> <td>\throws</td>
<td>replaced wih ':raises:'</td> <td>replaced with ':raises:'</td>
</tr> </tr>
<tr> <tr>
<td>\todo</td> <td>\todo</td>

View file

@ -3613,7 +3613,7 @@ A target language is given the 'Supported' status when
Examples must be available and run successfully. Examples must be available and run successfully.
</li> </li>
<li> <li>
The examples and test-suite must be fully functioning on the Travis Continuous Integration platform. The examples and test-suite must be fully functioning on the Github Actions Continuous Integration platform.
</li> </li>
</ul> </ul>
@ -3660,9 +3660,9 @@ Some minimum requirements and notes about languages with the 'Experimental' stat
The number of tests in these lists should be no greater than half of the number of tests in the full test-suite. The number of tests in these lists should be no greater than half of the number of tests in the full test-suite.
</li> </li>
<li> <li>
The examples and test-suite must also be fully functioning on the Travis Continuous Integration platform. The examples and test-suite must also be fully functioning on the Github Actions Continuous Integration platform.
However, experimental languages will be set as 'allow_failures'. However, experimental languages will be flagged as 'continue-on-error'.
This means that pull requests and normal development commits will not break the entire Travis build should an experimental language fail. This means that pull requests and normal development commits will not break the entire Github Actions build should an experimental language fail.
</li> </li>
<li> <li>
Any new failed tests will be fixed on a 'best effort' basis by core developers with no promises made. Any new failed tests will be fixed on a 'best effort' basis by core developers with no promises made.

View file

@ -9095,7 +9095,7 @@ This method normally calls the C++ destructor or <tt>free()</tt> for C code.
<p> <p>
The generated code can be debugged using both a Java debugger and a C++ debugger using the usual debugging techniques. The generated code can be debugged using both a Java debugger and a C++ debugger using the usual debugging techniques.
Breakpoints can be set in either Java or C++ code and so both can be debugged simultaneously. Breakpoints can be set in either Java or C++ code and so both can be debugged simultaneously.
Most debuggers do not understand both Java and C++, with one noteable exception of Sun Studio, Most debuggers do not understand both Java and C++, with one notable exception of Sun Studio,
where it is possible to step from Java code into a JNI method within one environment. where it is possible to step from Java code into a JNI method within one environment.
</p> </p>

View file

@ -1608,7 +1608,7 @@ public:
</div> </div>
<p> <p>
In Python, the static member can be access in three different ways: In Python, the static member can be accessed in three different ways:
</p> </p>
<div class="targetlang"> <div class="targetlang">
@ -1616,7 +1616,7 @@ In Python, the static member can be access in three different ways:
&gt;&gt;&gt; example.Spam_foo() # Spam::foo() &gt;&gt;&gt; example.Spam_foo() # Spam::foo()
&gt;&gt;&gt; s = example.Spam() &gt;&gt;&gt; s = example.Spam()
&gt;&gt;&gt; s.foo() # Spam::foo() via an instance &gt;&gt;&gt; s.foo() # Spam::foo() via an instance
&gt;&gt;&gt; example.Spam.foo() # Spam::foo(). Python-2.2 only &gt;&gt;&gt; example.Spam.foo() # Spam::foo() using Python-2.2 and later
</pre> </pre>
</div> </div>
@ -1627,16 +1627,31 @@ last technique is only available in Python-2.2 and later versions.
<p> <p>
Static member variables are currently accessed as global variables. This means, Static member variables are currently accessed as global variables. This means,
they are accessed through <tt>cvar</tt> like this: they are accessed through <tt>cvar</tt> or via an instance property:
</p> </p>
<div class="targetlang"> <div class="targetlang">
<pre> <pre>
&gt;&gt;&gt; print example.cvar.Spam_bar &gt;&gt;&gt; example.cvar.Spam_bar # Spam::bar
7
&gt;&gt;&gt; s = example.Spam()
&gt;&gt;&gt; s.bar # Spam::bar via an instance property
7 7
</pre> </pre>
</div> </div>
<p>
The <tt>-builtin</tt> option uses a metaclass to additionally provide access as follows:
</p>
<div class="targetlang">
<pre>
&gt;&gt;&gt; example.Spam.bar # Spam::bar using -builtin option only
7
</pre>
</div>
<H3><a name="Python_nn21">33.3.8 C++ inheritance</a></H3> <H3><a name="Python_nn21">33.3.8 C++ inheritance</a></H3>

View file

@ -196,7 +196,7 @@ slices)
<p> <p>
Wrapping of C++ classes for R works quite well. R has a special Wrapping of C++ classes for R works quite well. R has a special
type, known as an external reference, that can be used as a pointer type, known as an external reference, that can be used as a pointer
to arbitary things, including C++ classes. The proxy layers generated to arbitrary things, including C++ classes. The proxy layers generated
for other classes are not required. for other classes are not required.
</p> </p>
@ -265,7 +265,7 @@ v2$Axles
[1] 4 [1] 4
v1$Available v1$Available
[1] FALSE [1] FALSE
# Set availabilty # Set availability
v1$Available &lt;- TRUE v1$Available &lt;- TRUE
v1$Available v1$Available
[1] TRUE [1] TRUE

View file

@ -14,4 +14,8 @@
%include math.i %include math.i
extern double drand48(); %{
/* Add drand48 declaration as it is posix only and is not in stdlib.h when using strict c99 and later */
extern double drand48(void);
%}
extern double drand48(void);

View file

@ -10,7 +10,7 @@ class Exc {
public: public:
Exc(int c, const char *m) { Exc(int c, const char *m) {
code = c; code = c;
strncpy(msg,m,256); strncpy(msg,m,255);
} }
int code; int code;
char msg[256]; char msg[256];

View file

@ -10,7 +10,7 @@ class Exc {
public: public:
Exc(int c, const char *m) { Exc(int c, const char *m) {
code = c; code = c;
strncpy(msg,m,256); strncpy(msg,m,255);
} }
int code; int code;
char msg[256]; char msg[256];

View file

@ -10,7 +10,7 @@ class Exc {
public: public:
Exc(int c, const char *m) { Exc(int c, const char *m) {
code = c; code = c;
strncpy(msg,m,256); strncpy(msg,m,255);
} }
int code; int code;
char msg[256]; char msg[256];

View file

@ -90,7 +90,7 @@ struct FinalOverrideMethods {
virtual void override(int) {} virtual void override(int) {}
virtual ~FinalOverrideMethods() = default; virtual ~FinalOverrideMethods() = default;
}; };
struct FinalOverrideVariables { struct FinalOverrideVars {
int final; int final;
double override; double override;
}; };

View file

@ -21,6 +21,11 @@
%include <std_wstring.i> %include <std_wstring.i>
#endif #endif
#if defined(SWIGLUA)
// Lua uses a parameter called L in every wrapper function
%ignore L;
#endif
%inline %{ %inline %{
#include <iostream> #include <iostream>
#include <string> #include <string>

View file

@ -24,19 +24,19 @@ void takeit3(Thing const*&& t) {}
void takeit4(Thing *const&& t) {} void takeit4(Thing *const&& t) {}
void takeit5(Thing const*const&& t) {} void takeit5(Thing const*const&& t) {}
struct Containing { struct Contain {
Thing && member_rvalue_ref; Thing && m_ref;
Thing *&& member_rvalue_ref_ptr1; Thing *&& m_ref_ptr1;
Thing const*&& member_rvalue_ref_ptr2; Thing const*&& m_ref_ptr2;
Thing *const&& member_rvalue_ref_ptr3; Thing *const&& m_ref_ptr3;
Thing const*const &&member_rvalue_ref_ptr4; Thing const*const &&m_ref_ptr4;
Containing(Thing&&r, Thing*&& r1, Thing const*&& r2, Thing *const&& r3, Thing const*const && r4) : Contain(Thing&&r, Thing*&& r1, Thing const*&& r2, Thing *const&& r3, Thing const*const && r4) :
member_rvalue_ref(std::move(r)), m_ref(std::move(r)),
member_rvalue_ref_ptr1(std::move(r1)), m_ref_ptr1(std::move(r1)),
member_rvalue_ref_ptr2(std::move(r2)), m_ref_ptr2(std::move(r2)),
member_rvalue_ref_ptr3(std::move(r3)), m_ref_ptr3(std::move(r3)),
member_rvalue_ref_ptr4(std::move(r4)) m_ref_ptr4(std::move(r4))
{} {}
}; };
%} %}
@ -61,19 +61,19 @@ void int_takeit3(int const*&& t) {}
void int_takeit4(int *const&& t) {} void int_takeit4(int *const&& t) {}
void int_takeit5(int const*const&& t) {} void int_takeit5(int const*const&& t) {}
struct IntContaining { struct IContain {
int && member_rvalue_ref; int && m_ref;
int *&& member_rvalue_ref_ptr1; int *&& m_ref_ptr1;
int const*&& member_rvalue_ref_ptr2; int const*&& m_ref_ptr2;
int *const&& member_rvalue_ref_ptr3; int *const&& m_ref_ptr3;
int const*const &&member_rvalue_ref_ptr4; int const*const &&m_ref_ptr4;
IntContaining(int&& r, int*&& r1, int const*&& r2, int *const&& r3, int const*const && r4) : IContain(int&& r, int*&& r1, int const*&& r2, int *const&& r3, int const*const && r4) :
member_rvalue_ref(std::move(r)), m_ref(std::move(r)),
member_rvalue_ref_ptr1(std::move(r1)), m_ref_ptr1(std::move(r1)),
member_rvalue_ref_ptr2(std::move(r2)), m_ref_ptr2(std::move(r2)),
member_rvalue_ref_ptr3(std::move(r3)), m_ref_ptr3(std::move(r3)),
member_rvalue_ref_ptr4(std::move(r4)) m_ref_ptr4(std::move(r4))
{} {}
}; };
%} %}

View file

@ -1,5 +1,5 @@
/* This interface checks whether SWIG supports the new double angled brackets /* This interface checks whether SWIG supports the new double angled brackets
in the template syntax without having a space inbetween. This feature was in the template syntax without having a space in between. This feature was
introduced in new C++11 standard. introduced in new C++11 standard.
*/ */
%module cpp11_template_double_brackets %module cpp11_template_double_brackets

View file

@ -63,12 +63,14 @@ using IntArray = Int[];
// Test that SWIG understands these new types // Test that SWIG understands these new types
%{
Int mult2(Int x) { return x * 2; }
%}
%callback("%s_cb"); %callback("%s_cb");
Int mult2(Int x); Int mult2(Int x);
%nocallback; %nocallback;
%inline %{ %inline %{
Int mult2(Int x) { return x * 2; }
IntPtr allocate_int() { return new Int(12); } IntPtr allocate_int() { return new Int(12); }
void free_int(int* ptr) { delete ptr; } void free_int(int* ptr) { delete ptr; }
void inplace_mult2(IntRef x) { x *= 2; } void inplace_mult2(IntRef x) { x *= 2; }

View file

@ -47,7 +47,7 @@ void main() {
enforce(countUntil(vector[], i * 10) == i, "indexOf test failed, i: " ~ to!string(i)); enforce(countUntil(vector[], i * 10) == i, "indexOf test failed, i: " ~ to!string(i));
} }
enforce(countUntil(vector[], 42) == -1, "non-existant item indexOf test failed"); enforce(countUntil(vector[], 42) == -1, "non-existent item indexOf test failed");
vector.clear(); vector.clear();
enforce(vector.length == 0, "clear test failed"); enforce(vector.length == 0, "clear test failed");

View file

@ -39,15 +39,15 @@
;(check (=~ 15 (Overload-byval2cpr o #nil))) ;(check (=~ 15 (Overload-byval2cpr o #nil)))
;(check (=~ 16 (Overload-byval2cpr o x))) ;(check (=~ 16 (Overload-byval2cpr o x)))
; forward class declaration ; fwd class declaration
(check (=~ 17 (Overload-byval1forwardptr o x))) (check (=~ 17 (Overload-byval1fwdptr o x)))
(check (=~ 18 (Overload-byval1forwardptr o #nil))) (check (=~ 18 (Overload-byval1fwdptr o #nil)))
(check (=~ 19 (Overload-byval2forwardptr o #nil))) (check (=~ 19 (Overload-byval2fwdptr o #nil)))
(check (=~ 20 (Overload-byval2forwardptr o x))) (check (=~ 20 (Overload-byval2fwdptr o x)))
(check (=~ 21 (Overload-byval1forwardref o x))) (check (=~ 21 (Overload-byval1fwdref o x)))
(check (=~ 22 (Overload-byval2forwardref o x))) (check (=~ 22 (Overload-byval2fwdref o x)))
(exit 0) (exit 0)

View file

@ -37,13 +37,13 @@ check(13, o.byval1cpr(x));
// check(15, o.byval2cpr(null)); // check(15, o.byval2cpr(null));
check(16, o.byval2cpr(x)); check(16, o.byval2cpr(x));
// forward class declaration // fwd class declaration
check(17, o.byval1forwardptr(x)); check(17, o.byval1fwdptr(x));
// check(18, o.byval1forwardptr(null)); // check(18, o.byval1fwdptr(null));
// check(19, o.byval2forwardptr(null)); // check(19, o.byval2fwdptr(null));
check(20, o.byval2forwardptr(x)); check(20, o.byval2fwdptr(x));
check(21, o.byval1forwardref(x)); check(21, o.byval1fwdref(x));
check(22, o.byval2forwardref(x)); check(22, o.byval2fwdref(x));

View file

@ -29,13 +29,13 @@ assert(14 == o:byval1cpr(nil))
assert(15 == o:byval2cpr(nil)) assert(15 == o:byval2cpr(nil))
assert(16 == o:byval2cpr(x)) assert(16 == o:byval2cpr(x))
-- forward class declaration -- fwd class declaration
assert(17 == o:byval1forwardptr(x)) assert(17 == o:byval1fwdptr(x))
assert(18 == o:byval1forwardptr(nil)) assert(18 == o:byval1fwdptr(nil))
assert(19 == o:byval2forwardptr(nil)) assert(19 == o:byval2fwdptr(nil))
assert(20 == o:byval2forwardptr(x)) assert(20 == o:byval2fwdptr(x))
assert(21 == o:byval1forwardref(x)) assert(21 == o:byval1fwdref(x))
assert(22 == o:byval2forwardref(x)) assert(22 == o:byval2fwdref(x))

View file

@ -40,13 +40,13 @@ check(14, o.byval1cpr(null));
check(15, o.byval2cpr(null)); check(15, o.byval2cpr(null));
check(16, o.byval2cpr(x)); check(16, o.byval2cpr(x));
# forward class declaration # fwd class declaration
check(17, o.byval1forwardptr(x)); check(17, o.byval1fwdptr(x));
check(18, o.byval1forwardptr(null)); check(18, o.byval1fwdptr(null));
check(19, o.byval2forwardptr(null)); check(19, o.byval2fwdptr(null));
check(20, o.byval2forwardptr(x)); check(20, o.byval2fwdptr(x));
check(21, o.byval1forwardref(x)); check(21, o.byval1fwdref(x));
check(22, o.byval2forwardref(x)); check(22, o.byval2fwdref(x));

View file

@ -35,18 +35,18 @@ struct Overload {
int byval2cpr(Y*const& y) { return 15; } int byval2cpr(Y*const& y) { return 15; }
int byval2cpr(X x) { return 16; } int byval2cpr(X x) { return 16; }
// forward class declaration // fwd class declaration
int byval1forwardptr(X x) { return 17; } int byval1fwdptr(X x) { return 17; }
int byval1forwardptr(F* f) { return 18; } int byval1fwdptr(F* f) { return 18; }
int byval2forwardptr(F* f) { return 19; } int byval2fwdptr(F* f) { return 19; }
int byval2forwardptr(X x) { return 20; } int byval2fwdptr(X x) { return 20; }
int byval1forwardref(X x) { return 21; } int byval1fwdref(X x) { return 21; }
int byval1forwardref(F& f) { return -21; } int byval1fwdref(F& f) { return -21; }
int byval2forwardref(F& f) { return -22; } int byval2fwdref(F& f) { return -22; }
int byval2forwardref(X x) { return 22; } int byval2fwdref(X x) { return 22; }
}; };
%} %}

View file

@ -32,13 +32,13 @@ is(14, $o->byval1cpr(undef));
is(15, $o->byval2cpr(undef)); is(15, $o->byval2cpr(undef));
is(16, $o->byval2cpr($x)); is(16, $o->byval2cpr($x));
# forward class declaration # fwd class declaration
is(17, $o->byval1forwardptr($x)); is(17, $o->byval1fwdptr($x));
is(18, $o->byval1forwardptr(undef)); is(18, $o->byval1fwdptr(undef));
is(19, $o->byval2forwardptr(undef)); is(19, $o->byval2fwdptr(undef));
is(20, $o->byval2forwardptr($x)); is(20, $o->byval2fwdptr($x));
is(21, $o->byval1forwardref($x)); is(21, $o->byval1fwdref($x));
is(22, $o->byval2forwardref($x)); is(22, $o->byval2fwdref($x));

View file

@ -30,15 +30,15 @@ check::equal(14, $o->byval1cpr(null), "test 14");
check::equal(15, $o->byval2cpr(null), "test 15"); check::equal(15, $o->byval2cpr(null), "test 15");
check::equal(16, $o->byval2cpr($x), "test 16"); check::equal(16, $o->byval2cpr($x), "test 16");
# forward class declaration # fwd class declaration
check::equal(17, $o->byval1forwardptr($x), "test 17"); check::equal(17, $o->byval1fwdptr($x), "test 17");
check::equal(18, $o->byval1forwardptr(null), "test 18"); check::equal(18, $o->byval1fwdptr(null), "test 18");
check::equal(19, $o->byval2forwardptr(null), "test 19"); check::equal(19, $o->byval2fwdptr(null), "test 19");
check::equal(20, $o->byval2forwardptr($x), "test 20"); check::equal(20, $o->byval2fwdptr($x), "test 20");
check::equal(21, $o->byval1forwardref($x), "test 21"); check::equal(21, $o->byval1fwdref($x), "test 21");
check::equal(22, $o->byval2forwardref($x), "test 22"); check::equal(22, $o->byval2fwdref($x), "test 22");
check::done(); check::done();

View file

@ -32,13 +32,13 @@ check(14, o.byval1cpr(None))
check(15, o.byval2cpr(None)) check(15, o.byval2cpr(None))
check(16, o.byval2cpr(x)) check(16, o.byval2cpr(x))
# forward class declaration # fwd class declaration
check(17, o.byval1forwardptr(x)) check(17, o.byval1fwdptr(x))
check(18, o.byval1forwardptr(None)) check(18, o.byval1fwdptr(None))
check(19, o.byval2forwardptr(None)) check(19, o.byval2fwdptr(None))
check(20, o.byval2forwardptr(x)) check(20, o.byval2fwdptr(x))
check(21, o.byval1forwardref(x)) check(21, o.byval1fwdref(x))
check(22, o.byval2forwardref(x)) check(22, o.byval2fwdref(x))

View file

@ -9,6 +9,8 @@ class Ai:
def __int__(self): def __int__(self):
return self.x return self.x
def __index__(self):
return self.x
class Ad: class Ad:

View file

@ -34,16 +34,16 @@ unittest(12, o$byconstref2(x))
#unittest(15, o$byval2cpr(NULL)) #unittest(15, o$byval2cpr(NULL))
#unittest(16, o$byval2cpr(x)) #unittest(16, o$byval2cpr(x))
# forward class declaration # fwd class declaration
unittest(17, o$byval1forwardptr(x)) unittest(17, o$byval1fwdptr(x))
unittest(18, o$byval1forwardptr(NULL)) unittest(18, o$byval1fwdptr(NULL))
unittest(19, o$byval2forwardptr(NULL)) unittest(19, o$byval2fwdptr(NULL))
unittest(20, o$byval2forwardptr(x)) unittest(20, o$byval2fwdptr(x))
unittest(21, o$byval1forwardref(x)) unittest(21, o$byval1fwdref(x))
unittest(22, o$byval2forwardref(x)) unittest(22, o$byval2fwdref(x))
q(save="no") q(save="no")

View file

@ -4,6 +4,18 @@
struct swig_tree; struct swig_tree;
%} %}
%{
#if defined(__cplusplus)
#if __cplusplus >= 201703L
/*
Fix for languages that compile C tests as C++:
error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register]
*/
#define register
#endif
#endif
%}
// bug # 924413 // bug # 924413
%inline { %inline {
void clear_tree_flags(register struct swig_tree *tp, register int i) {} void clear_tree_flags(register struct swig_tree *tp, register int i) {}

View file

@ -40,13 +40,13 @@ swig_assert(14 == o.byval1cpr(nil))
swig_assert(15 == o.byval2cpr(nil)) swig_assert(15 == o.byval2cpr(nil))
swig_assert(16 == o.byval2cpr(x)) swig_assert(16 == o.byval2cpr(x))
# forward class declaration # fwd class declaration
swig_assert(17 == o.byval1forwardptr(x)) swig_assert(17 == o.byval1fwdptr(x))
swig_assert(18 == o.byval1forwardptr(nil)) swig_assert(18 == o.byval1fwdptr(nil))
swig_assert(19 == o.byval2forwardptr(nil)) swig_assert(19 == o.byval2fwdptr(nil))
swig_assert(20 == o.byval2forwardptr(x)) swig_assert(20 == o.byval2fwdptr(x))
swig_assert(21 == o.byval1forwardref(x)) swig_assert(21 == o.byval1fwdref(x))
swig_assert(22 == o.byval2forwardref(x)) swig_assert(22 == o.byval2fwdref(x))

View file

@ -30,16 +30,16 @@ checkequal(14, Overload_byval1cpr(o, NULL), "test 14");
checkequal(15, Overload_byval2cpr(o, NULL), "test 15"); checkequal(15, Overload_byval2cpr(o, NULL), "test 15");
checkequal(16, Overload_byval2cpr(o, x), "test 16"); checkequal(16, Overload_byval2cpr(o, x), "test 16");
// forward class declaration // fwd class declaration
checkequal(17, Overload_byval1forwardptr(o, x), "test 17"); checkequal(17, Overload_byval1fwdptr(o, x), "test 17");
checkequal(18, Overload_byval1forwardptr(o, NULL), "test 18"); checkequal(18, Overload_byval1fwdptr(o, NULL), "test 18");
checkequal(19, Overload_byval2forwardptr(o, NULL), "test 19"); checkequal(19, Overload_byval2fwdptr(o, NULL), "test 19");
checkequal(20, Overload_byval2forwardptr(o, x), "test 20"); checkequal(20, Overload_byval2fwdptr(o, x), "test 20");
checkequal(21, Overload_byval1forwardref(o, x), "test 21"); checkequal(21, Overload_byval1fwdref(o, x), "test 21");
checkequal(22, Overload_byval2forwardref(o, x), "test 22"); checkequal(22, Overload_byval2fwdref(o, x), "test 22");
exec("swigtest.quit", -1); exec("swigtest.quit", -1);

View file

@ -24,7 +24,7 @@ endfunction
test_global(); test_global();
// Test assignement in enums // Test assignment in enums
checkequal(kValue_get(), 4, "kValue"); checkequal(kValue_get(), 4, "kValue");
exec("swigtest.quit", -1); exec("swigtest.quit", -1);

View file

@ -7,7 +7,7 @@
// Test truncating variables, constants, functions identifier names // Test truncating variables, constants, functions identifier names
%inline %{ %inline %{
// these identifier names wont be truncated // these identifier names won't be truncated
int gvar_identifier_name = -1; int gvar_identifier_name = -1;
#define CONS_IDENTIFIER_NAME -11 #define CONS_IDENTIFIER_NAME -11
int function_identifier_name() { return -21; }; int function_identifier_name() { return -21; };

View file

@ -70,7 +70,10 @@ class ItkVectorContainerUILSNUS2 : public std::vector< ItkLevelSetNodeUS2 > {
class ItkVectorContainerUILSNUS2_Pointer { class ItkVectorContainerUILSNUS2_Pointer {
public: public:
ItkVectorContainerUILSNUS2 * operator->() const { return 0; } ItkVectorContainerUILSNUS2 * operator->() const {
static ItkVectorContainerUILSNUS2 instance;
return &instance;
}
}; };
%} %}

View file

@ -15,8 +15,8 @@ import
set x [new_B] set x [new_B]
A_hello $x A_hello $x
if [ catch { $x nonexistant } ] { if [ catch { $x nonexistent } ] {
} else { } else {
puts stderr "nonexistant method did not throw exception\n" puts stderr "nonexistent method did not throw exception\n"
exit 1 exit 1
} }

View file

@ -40,13 +40,13 @@ check "testX" 14 [$o byval1cpr "NULL"]
check "testX" 15 [$o byval2cpr "NULL"] check "testX" 15 [$o byval2cpr "NULL"]
check "testX" 16 [$o byval2cpr $x] check "testX" 16 [$o byval2cpr $x]
# forward class declaration # fwd class declaration
check "testX" 17 [$o byval1forwardptr $x] check "testX" 17 [$o byval1fwdptr $x]
check "testX" 18 [$o byval1forwardptr "NULL"] check "testX" 18 [$o byval1fwdptr "NULL"]
check "testX" 19 [$o byval2forwardptr "NULL"] check "testX" 19 [$o byval2fwdptr "NULL"]
check "testX" 20 [$o byval2forwardptr $x] check "testX" 20 [$o byval2fwdptr $x]
check "testX" 21 [$o byval1forwardref $x] check "testX" 21 [$o byval1fwdref $x]
check "testX" 22 [$o byval2forwardref $x] check "testX" 22 [$o byval2fwdref $x]

View file

@ -61,7 +61,11 @@ void CheckRetTypemapUsed() {
%inline { %inline {
class FFoo { class FFoo {
public: public:
char * Bar(bool b) const { return (char *)"x"; } char * Bar(bool b) const {
char *ret = new char[2];
strcpy(ret, b ? "1" : "0");
return ret;
}
}; };
} }

View file

@ -58,7 +58,7 @@ template SwigOperatorDefinitions() {
%rename(opCall) *::operator(); %rename(opCall) *::operator();
// !a is not overrideable in D1. // !a is not overridable in D1.
%ignoreoperator(LNOT) operator!; %ignoreoperator(LNOT) operator!;
// opCmp is used in D. // opCmp is used in D.
@ -71,7 +71,7 @@ template SwigOperatorDefinitions() {
// a != b is rewritten as !a.opEquals(b) in D. // a != b is rewritten as !a.opEquals(b) in D.
%ignoreoperator(NOTEQUAL) operator!=; %ignoreoperator(NOTEQUAL) operator!=;
// The logic operators are not overrideable in D. // The logic operators are not overridable in D.
%ignoreoperator(LAND) operator&&; %ignoreoperator(LAND) operator&&;
%ignoreoperator(LOR) operator||; %ignoreoperator(LOR) operator||;
@ -198,7 +198,7 @@ mixin template SwigOperatorDefinitions() {
// a != b is rewritten as !a.opEquals(b) in D. // a != b is rewritten as !a.opEquals(b) in D.
%ignoreoperator(NOTEQUAL) operator!=; %ignoreoperator(NOTEQUAL) operator!=;
// The logic operators are not overrideable in D. // The logic operators are not overridable in D.
%ignoreoperator(LAND) operator&&; %ignoreoperator(LAND) operator&&;
%ignoreoperator(LOR) operator||; %ignoreoperator(LOR) operator||;

View file

@ -14,7 +14,7 @@ SWIG_AsCharPtrAndSize(SWIGV8_VALUE valRef, char** cptr, size_t* psize, int *allo
%#endif %#endif
size_t len = SWIGV8_UTF8_LENGTH(js_str) + 1; size_t len = SWIGV8_UTF8_LENGTH(js_str) + 1;
char* cstr = new char[len]; char* cstr = (char*) %new_array(len, char);
SWIGV8_WRITE_UTF8(js_str, cstr, len); SWIGV8_WRITE_UTF8(js_str, cstr, len);
if(alloc) *alloc = SWIG_NEWOBJ; if(alloc) *alloc = SWIG_NEWOBJ;

View file

@ -39,12 +39,12 @@ $1 = ($type)lua_tonumber(L, $input);%}
// SWIG assumes that this code will need a pointer to int to be passed in // SWIG assumes that this code will need a pointer to int to be passed in
// (this might be ok for objects by const ref, but not for numeric primitives) // (this might be ok for objects by const ref, but not for numeric primitives)
// therefore we add a set of typemaps to fix this (for both in & out) // therefore we add a set of typemaps to fix this (for both in & out)
%typemap(in,checkfn="lua_isnumber") const int&($basetype temp) %typemap(in,checkfn="lua_isnumber") const int&($*1_ltype temp)
%{ temp=($basetype)lua_tonumber(L,$input); $1=&temp;%} %{ temp=($*1_ltype)lua_tonumber(L,$input); $1=&temp;%}
%typemap(in,checkfn="lua_isnumber") const unsigned int&($basetype temp) %typemap(in,checkfn="lua_isnumber") const unsigned int&($*1_ltype temp)
%{SWIG_contract_assert((lua_tonumber(L,$input)>=0),"number must not be negative") %{SWIG_contract_assert((lua_tonumber(L,$input)>=0),"number must not be negative")
temp=($basetype)lua_tonumber(L,$input); $1=&temp;%} temp=($*1_ltype)lua_tonumber(L,$input); $1=&temp;%}
%typemap(out) const int&, const unsigned int& %typemap(out) const int&, const unsigned int&
%{ lua_pushnumber(L, (lua_Number) *$1); SWIG_arg++;%} %{ lua_pushnumber(L, (lua_Number) *$1); SWIG_arg++;%}

View file

@ -2,7 +2,7 @@
Defines the As/From conversors for double/float complex, you need to Defines the As/From conversors for double/float complex, you need to
provide complex Type, the Name you want to use in the conversors, provide complex Type, the Name you want to use in the conversors,
the complex Constructor method, and the Real and Imag complex the complex Constructor method, and the Real and Imag complex
accesor methods. accessor methods.
See the std_complex.i and ccomplex.i for concrete examples. See the std_complex.i and ccomplex.i for concrete examples.
*/ */

View file

@ -77,7 +77,7 @@ AUTODOC(operator>, "Higher than comparison operator");
AUTODOC(operator<<, "Left shifting or appending operator"); AUTODOC(operator<<, "Left shifting or appending operator");
AUTODOC(operator>>, "Right shifting operator or extracting operator"); AUTODOC(operator>>, "Right shifting operator or extracting operator");
AUTODOC(operator+, "Add operator"); AUTODOC(operator+, "Add operator");
AUTODOC(operator-, "Substraction operator"); AUTODOC(operator-, "Subtraction operator");
AUTODOC(operator+(), "Positive operator"); AUTODOC(operator+(), "Positive operator");
AUTODOC(operator-(), "Negation operator"); AUTODOC(operator-(), "Negation operator");
AUTODOC(operator&, "AND operator"); AUTODOC(operator&, "AND operator");
@ -93,7 +93,7 @@ AUTODOC(__gt__, "Higher than comparison operator");
AUTODOC(__lshift__, "Left shifting or appending operator"); AUTODOC(__lshift__, "Left shifting or appending operator");
AUTODOC(__rshift__, "Right shifting operator or extracting operator"); AUTODOC(__rshift__, "Right shifting operator or extracting operator");
AUTODOC(__add___, "Add operator"); AUTODOC(__add___, "Add operator");
AUTODOC(__sub__, "Substraction operator"); AUTODOC(__sub__, "Subtraction operator");
AUTODOC(__pos__, "Positive operator"); AUTODOC(__pos__, "Positive operator");
AUTODOC(__neg__, "Negation operator"); AUTODOC(__neg__, "Negation operator");
AUTODOC(__and__, "AND operator"); AUTODOC(__and__, "AND operator");

View file

@ -18,7 +18,7 @@ SWIG_Int_AsEnum(void *pvApiCtx, int iVar, int *enumValue, char *fname) {
} }
%fragment(SWIG_From_frag(Enum), "header", fragment="SWIG_Int_FromEnum") { %fragment(SWIG_From_frag(Enum), "header", fragment="SWIG_Int_FromEnum") {
%#define SWIG_From_Enum(scilabValue) SWIG_Int_FromEnum(pvApiCtx, SWIG_Scilab_GetOutputPosition(), scilabValue, SWIG_Scilab_GetFuncName()) %#define SWIG_From_Enum(scilabValue) SWIG_Int_FromEnum(pvApiCtx, SWIG_Scilab_GetOutputPosition(), (int)scilabValue, SWIG_Scilab_GetFuncName())
} }
%fragment("SWIG_Int_FromEnum", "header", fragment="SWIG_SciDouble_FromInt") { %fragment("SWIG_Int_FromEnum", "header", fragment="SWIG_SciDouble_FromInt") {
SWIGINTERN int SWIGINTERN int

View file

@ -126,7 +126,7 @@ MacintoshInit()
* *
* This procedure calls initialization routines require a Tcl * This procedure calls initialization routines require a Tcl
* interp as an argument. This call effectively makes the passed * interp as an argument. This call effectively makes the passed
* iterpreter the "main" interpreter for the application. * interpreter the "main" interpreter for the application.
* *
* Results: * Results:
* Returns TCL_OK if everything went fine. If it didn't the * Returns TCL_OK if everything went fine. If it didn't the

View file

@ -53,13 +53,13 @@ public:
virtual ~DoxygenTranslator(); virtual ~DoxygenTranslator();
/* /*
* Return the documentation for a given node formated for the correct * Return the documentation for a given node formatted for the correct
* documentation system. * documentation system.
*/ */
String *getDocumentation(Node *node, const_String_or_char_ptr indentationString); String *getDocumentation(Node *node, const_String_or_char_ptr indentationString);
/* /*
* Returns truem is the specified node has comment attached. * Returns true if the specified node has comment attached.
*/ */
bool hasDocumentation(Node *node); bool hasDocumentation(Node *node);

View file

@ -195,7 +195,7 @@ private:
typedef std::map<std::string, std::pair<tagHandler, std::string> >TagHandlersMap; typedef std::map<std::string, std::pair<tagHandler, std::string> >TagHandlersMap;
static TagHandlersMap tagHandlers; static TagHandlersMap tagHandlers;
// this contains the sections tittles, like 'Arguments:' or 'Notes:', that are printed only once // this contains the sections titles, like 'Arguments:' or 'Notes:', that are printed only once
static std::map<std::string, std::string> sectionTitles; static std::map<std::string, std::string> sectionTitles;
// Helper functions for fillStaticTables(): make a new tag handler object. // Helper functions for fillStaticTables(): make a new tag handler object.

View file

@ -196,7 +196,7 @@ public:
String *name = Getattr(n, "name") ? Getattr(n, "name") : NewString("<unnamed>"); String *name = Getattr(n, "name") ? Getattr(n, "name") : NewString("<unnamed>");
Swig_warning(WARN_JAVA_NSPACE_WITHOUT_PACKAGE, Getfile(n), Getline(n), Swig_warning(WARN_JAVA_NSPACE_WITHOUT_PACKAGE, Getfile(n), Getline(n),
"The nspace feature is used on '%s' without -package. " "The nspace feature is used on '%s' without -package. "
"The generated code may not compile as Java does not support types declared in a named package accessing types declared in an unnamed package.\n", name); "The generated code may not compile as Java does not support types declared in a named package accessing types declared in an unnamed package.\n", SwigType_namestr(name));
} }
} }

View file

@ -1255,7 +1255,7 @@ int JSEmitter::emitFunctionDispatcher(Node *n, bool /*is_member */ ) {
// Note: this dispatcher function gets called after the last overloaded function has been created. // Note: this dispatcher function gets called after the last overloaded function has been created.
// At this time, n.wrap:name contains the name of the last wrapper function. // At this time, n.wrap:name contains the name of the last wrapper function.
// To get a valid function name for the dispatcher function we take the last wrapper name and // To get a valid function name for the dispatcher function we take the last wrapper name and
// substract the extension "sym:overname", // subtract the extension "sym:overname",
String *wrap_name = NewString(Getattr(n, "wrap:name")); String *wrap_name = NewString(Getattr(n, "wrap:name"));
String *overname = Getattr(n, "sym:overname"); String *overname = Getattr(n, "sym:overname");

View file

@ -632,7 +632,7 @@ String *Swig_cppconstructor_director_call(const_String_or_char_ptr name, ParmLis
* If you define SWIG_FAST_REC_SEARCH, the method will set the found * If you define SWIG_FAST_REC_SEARCH, the method will set the found
* 'attr' in the target class 'n'. If not, the method will set the * 'attr' in the target class 'n'. If not, the method will set the
* 'noattr' one. This prevents of having to navigate the entire * 'noattr' one. This prevents of having to navigate the entire
* hierarchy tree everytime, so, it is an O(1) method... or something * hierarchy tree every time, so, it is an O(1) method... or something
* like that. However, it populates all the parsed classes with the * like that. However, it populates all the parsed classes with the
* 'attr' and/or 'noattr' attributes. * 'attr' and/or 'noattr' attributes.
* *

View file

@ -1541,7 +1541,7 @@ String *Swig_name_make(Node *n, String *prefix, const_String_or_char_ptr cname,
if (n) { if (n) {
/* Parameter renaming is not fully implemented. Mainly because there is no C/C++ syntax to /* Parameter renaming is not fully implemented. Mainly because there is no C/C++ syntax to
* for %rename to fully qualify a function's parameter name from outside the function. Hence it * for %rename to fully qualify a function's parameter name from outside the function. Hence it
* is not possible to implemented targetted warning suppression on one parameter in one function. */ * is not possible to implemented targeted warning suppression on one parameter in one function. */
int suppress_parameter_rename_warning = Equal(nodeType(n), "parm"); int suppress_parameter_rename_warning = Equal(nodeType(n), "parm");
if (!suppress_parameter_rename_warning) { if (!suppress_parameter_rename_warning) {
SWIG_WARN_NODE_BEGIN(n); SWIG_WARN_NODE_BEGIN(n);

View file

@ -0,0 +1,39 @@
#!/bin/bash
# Expected to be called from elsewhere with same variables set as CI-linux-install.sh
# e.g. RETRY=travis-retry SWIGLANG=python
# Sets up environment for using various target languages
# For Github Actions where the environment is not preserved between steps
set -e # exit on failure (same as -o errexit)
case "$SWIGLANG" in
"go")
if [[ "$VER" ]]; then
eval "$($HOME/bin/gimme ${VER}.x)"
$HOME/bin/gimme --list
fi
;;
"javascript")
case "$ENGINE" in
"node")
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
nvm use ${VER}
;;
*) ;;
esac
;;
"ruby")
if ! command -v rvm; then
set +x
source $HOME/.rvm/scripts/rvm
set -x
fi
;;
"scilab")
# Travis has the wrong version of Java pre-installed resulting in error using scilab:
# /usr/bin/scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory
echo "JAVA_HOME was set to $JAVA_HOME"
unset JAVA_HOME
;;
*) ;;
esac

View file

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# expected to be called from elsewhere with certain variables set # Expected to be called from elsewhere with certain variables set
# e.g. RETRY=travis-retry SWIGLANG=python GCC=7 # e.g. RETRY=travis-retry SWIGLANG=python GCC=7
set -e # exit on failure (same as -o errexit) set -e # exit on failure (same as -o errexit)
@ -7,6 +7,8 @@ if [[ -n "$GCC" ]]; then
$RETRY sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test $RETRY sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
$RETRY sudo apt-get -qq update $RETRY sudo apt-get -qq update
$RETRY sudo apt-get install -qq g++-$GCC $RETRY sudo apt-get install -qq g++-$GCC
else
$RETRY sudo apt-get -qq update
fi fi
$RETRY sudo apt-get -qq install libboost-dev libpcre3-dev $RETRY sudo apt-get -qq install libboost-dev libpcre3-dev
@ -26,7 +28,11 @@ case "$SWIGLANG" in
;; ;;
"go") "go")
if [[ "$VER" ]]; then if [[ "$VER" ]]; then
eval "$(gimme ${VER}.x)" mkdir -p $HOME/bin
curl -sL -o $HOME/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
chmod +x $HOME/bin/gimme
eval "$($HOME/bin/gimme ${VER}.x)"
$HOME/bin/gimme --list
fi fi
;; ;;
"javascript") "javascript")
@ -34,7 +40,7 @@ case "$SWIGLANG" in
"node") "node")
$RETRY wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.10/install.sh | bash $RETRY wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.10/install.sh | bash
export NVM_DIR="$HOME/.nvm" export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
$RETRY nvm install ${VER} $RETRY nvm install ${VER}
nvm use ${VER} nvm use ${VER}
if [ "$VER" == "0.10" ] || [ "$VER" == "0.12" ] || [ "$VER" == "4" ] || [ "$VER" == "6" ] ; then if [ "$VER" == "0.10" ] || [ "$VER" == "0.12" ] || [ "$VER" == "4" ] || [ "$VER" == "6" ] ; then
@ -73,12 +79,16 @@ case "$SWIGLANG" in
$RETRY sudo apt-get -qq install ocaml camlp4 $RETRY sudo apt-get -qq install ocaml camlp4
;; ;;
"octave") "octave")
$RETRY sudo apt-get -qq update
$RETRY sudo apt-get -qq install liboctave-dev $RETRY sudo apt-get -qq install liboctave-dev
;; ;;
"php") "php")
$RETRY sudo add-apt-repository -y ppa:ondrej/php if [[ "$VER" ]]; then
$RETRY sudo apt-get -qq update $RETRY sudo apt-get -qq remove "php*-cli" "php*-dev" # Multiple versions are pre-installed
$RETRY sudo apt-get -qq install php$VER-cli php$VER-dev $RETRY sudo add-apt-repository -y ppa:ondrej/php
$RETRY sudo apt-get -qq update
$RETRY sudo apt-get -qq install php$VER-cli php$VER-dev
fi
;; ;;
"python") "python")
pip install --user pycodestyle pip install --user pycodestyle

View file

@ -10,7 +10,7 @@
# #
# Test for the Boost C++ libraries of a particular version (or newer) # Test for the Boost C++ libraries of a particular version (or newer)
# #
# If no path to the installed boost library is given the macro searchs # If no path to the installed boost library is given the macro searches
# under /usr, /usr/local, /opt and /opt/local and evaluates the # under /usr, /usr/local, /opt and /opt/local and evaluates the
# $BOOST_ROOT environment variable. Further documentation is available at # $BOOST_ROOT environment variable. Further documentation is available at
# <http://randspringer.de/boost/index.html>. # <http://randspringer.de/boost/index.html>.

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Install Linux packages where the version has been overidden in .travis.yml # Install Linux packages where the version has been overridden in .travis.yml
lsb_release -a lsb_release -a
# find location of current script (only works in bash) # find location of current script (only works in bash)

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Install MacOS packages where the version has been overidden in .travis.yml # Install MacOS packages where the version has been overridden in .travis.yml
set -e # exit on failure (same as -o errexit) set -e # exit on failure (same as -o errexit)

View file

@ -2,6 +2,13 @@ platform:
- x86 - x86
- x64 - x64
skip_commits:
files:
- '.github/**'
- 'CHANGES*'
- 'Doc/**'
- 'Tools/CI-*'
environment: environment:
global: global:
MAKEJOBS: 2 MAKEJOBS: 2
@ -45,6 +52,14 @@ matrix:
- SWIGLANG: python - SWIGLANG: python
OSVARIANT: cygwin OSVARIANT: cygwin
# Skip stale commits (pull requests only), see https://github.com/appveyor/ci/issues/38#issuecomment-70628826
init:
- ps: |
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
install: install:
- date /T & time /T - date /T & time /T
- ps: >- - ps: >-

View file

@ -146,14 +146,14 @@ then
*-*-aix*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";; *-*-aix*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
*-*-cygwin* | *-*-mingw*) *-*-cygwin* | *-*-mingw*)
if test "$GCC" = yes; then if test "$GCC" = yes; then
LDSHARED="$CC -shared" LDSHARED="\$(CC) -shared"
else else
if test "cl" = $CC ; then if test "cl" = $CC ; then
# Microsoft Visual C++ (MSVC) # Microsoft Visual C++ (MSVC)
LDSHARED="$CC -nologo -LD" LDSHARED="\$(CC) -nologo -LD"
else else
# Unknown compiler try gcc approach # Unknown compiler try gcc approach
LDSHARED="$CC -shared" LDSHARED="\$(CC) -shared"
fi fi
fi ;; fi ;;
*-*-irix5*) LDSHARED="ld -shared";; *-*-irix5*) LDSHARED="ld -shared";;
@ -165,25 +165,25 @@ then
*-sequent-sysv4) LDSHARED="ld -G";; *-sequent-sysv4) LDSHARED="ld -G";;
*-*-next*) *-*-next*)
if test "$ns_dyld" if test "$ns_dyld"
then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' then LDSHARED="\$(CC) \$(LDFLAGS) -bundle -prebind"
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r' else LDSHARED="\$(CC) \$(CFLAGS) -nostdlib -r"
fi fi
if test "$with_next_framework" ; then if test "$with_next_framework" ; then
LDSHARED="$LDSHARED \$(LDLIBRARY)" LDSHARED="$LDSHARED \$(LDLIBRARY)"
fi ;; fi ;;
*-*-linux*) LDSHARED="$CC -shared";; *-*-linux*) LDSHARED="\$(CC) -shared";;
*-*-dgux*) LDSHARED="ld -G";; *-*-dgux*) LDSHARED="ld -G";;
*-*-freebsd3*) LDSHARED="$CC -shared";; *-*-freebsd3*) LDSHARED="\$(CC) -shared";;
*-*-freebsd* | *-*-openbsd*) LDSHARED="ld -Bshareable";; *-*-freebsd* | *-*-openbsd*) LDSHARED="ld -Bshareable";;
*-*-netbsd*) *-*-netbsd*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]] if [[ "`\$(CC) -dM -E - </dev/null | grep __ELF__`" != "" ]]
then then
LDSHARED="$CC -shared" LDSHARED="\$(CC) -shared"
else else
LDSHARED="ld -Bshareable" LDSHARED="ld -Bshareable"
fi;; fi;;
*-sco-sysv*) LDSHARED="$CC -G -KPIC -Ki486 -belf -Wl,-Bexport";; *-sco-sysv*) LDSHARED="\$(CC) -G -KPIC -Ki486 -belf -Wl,-Bexport";;
*-*-darwin*) LDSHARED="$CC -bundle -undefined suppress -flat_namespace";; *-*-darwin*) LDSHARED="\$(CC) -bundle -undefined suppress -flat_namespace";;
*) LDSHARED="ld";; *) LDSHARED="ld";;
esac esac
fi fi
@ -205,23 +205,23 @@ if test -z "$TRYLINKINGWITHCXX"
then then
case $host in case $host in
*-*-solaris*) if test "$GCC" = yes *-*-solaris*) if test "$GCC" = yes
then TRYLINKINGWITHCXX="CXXSHARED= $CXX -Wl,-G" then TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -Wl,-G"
else TRYLINKINGWITHCXX="CXXSHARED= $CXX -G -L/opt/SUNWspro/lib -lCrun -lCstd" else TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -G -L/opt/SUNWspro/lib -lCrun -lCstd"
fi;; fi;;
*-*-hp*) TRYLINKINGWITHCXX="CXXSHARED= $CXX +z ";; *-*-hp*) TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) +z ";;
*-*-darwin*) TRYLINKINGWITHCXX="CXXSHARED= $CXX -bundle -undefined suppress -flat_namespace";; *-*-darwin*) TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -bundle -undefined suppress -flat_namespace";;
*-*-cygwin* | *-*-mingw*) *-*-cygwin* | *-*-mingw*)
if test "$GCC" = yes; then if test "$GCC" = yes; then
TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared " TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -shared "
else else
if test "cl" = $CXX ; then if test "cl" = $CXX ; then
# Microsoft Visual C++ (MSVC) # Microsoft Visual C++ (MSVC)
TRYLINKINGWITHCXX="CXXSHARED= $CXX -nologo -LD" TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -nologo -LD"
else else
TRYLINKINGWITHCXX="#unknown Windows compiler" TRYLINKINGWITHCXX="#unknown Windows compiler"
fi fi
fi ;; fi ;;
*) TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared ";; *) TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -shared ";;
esac esac
fi fi
AC_MSG_RESULT($TRYLINKINGWITHCXX) AC_MSG_RESULT($TRYLINKINGWITHCXX)
@ -1251,6 +1251,9 @@ else
if test $SCILAB_VERSION -ge 540; then if test $SCILAB_VERSION -ge 540; then
SCILABOPT+=" -noatomsautoload" SCILABOPT+=" -noatomsautoload"
fi fi
if test $SCILAB_VERSION -ge 600; then
SCILABOPT+=" -quit"
fi
AC_MSG_RESULT($SCILABOPT) AC_MSG_RESULT($SCILABOPT)
# Check for Scilab header files # Check for Scilab header files