Commit graph

20,228 commits

Author SHA1 Message Date
William S Fulton
62417708fd Better name for container back-reference attribute
Mangle name with swig so as not to clash with any attribute names a
user might use.
Remove Doxygen style comments - we don't use Doxygen in SWIG.
2019-02-15 22:01:38 +00:00
Jake Cobb
30f16b9138 Python - Struct spec. for container owner
Use a struct with specialization to dispatch the container
owner reference function instead of a function.  Avoids
possible future problems if overloading were introduced.
2019-02-04 13:48:52 -05:00
Jake Cobb
40e327d742 Python: Avoid container owner check for value types 2019-01-23 16:10:26 -05:00
Jake Cobb
5185ce67b5 Python: Init container owner attribute in thread-safe way 2019-01-23 15:12:45 -05:00
Jake Cobb
92df196408 Python: Use PyObject_SetAttr instead of PyObject_GenericSetAttr for back-ref 2018-04-19 10:32:11 -04:00
Jake Cobb
cc2dc6b192 Python: Cleanup container back ref
Use a single function in a fragment.
Use SWIG_Python_GetSwigThis instead of
directly grabbing the 'this' attribute.
2018-04-18 20:39:56 -04:00
Jake Cobb
65dd1c49bc Python: Keep reference to owning container during element access 2018-04-18 17:28:31 -04:00
Ivan Leonov
34ee191769 Add if-no-present action for jsv8inc arg 2018-04-18 13:08:15 +12:00
Ivan Leonov
209586c991 Fix typo in help --with-jscoreinc and --with-jscorelib 2018-04-18 13:08:15 +12:00
Geert Janssens
46ab0c252d Fix off-by-one error
The condition only applies to guile 1.8 and older so it should really
have been '<2' all along. As we already have such a conditional block
earlier up, merge the two together as well.
2018-04-18 13:07:03 +12:00
Olly Betts
3042ff60fe
Merge pull request #1222 from bje-/configfiles-urls
* Makefile.in (configfiles): Update URLs for latest configfiles.
2018-04-10 12:30:10 +12:00
Ben Elliston
cf8f99ba44 * Makefile.in (configfiles): Update URLs for latest configfiles.
We haven't uploaded the latest version of these scripts to ftp.gnu.org
in over 10 years. See ftp://ftp.gnu.org/pub/gnu/config/README. The
best place to fetch them from is the Savannah git repository.
2018-04-10 10:07:47 +10:00
William S Fulton
15a09ffbdc Add changes entry for Ruby %alias fix for global functions 2018-04-07 12:34:39 +01:00
William S Fulton
5ccae6eac6 Merge branch 'goatshriek-ruby-alias'
* goatshriek-ruby-alias:
  Fix ruby %alias directive for native c functions
2018-04-07 12:34:08 +01:00
Olly Betts
3bea8f6b7e [Ruby] Pass Qnil instead of NULL to rb_funcall()
This silences GCC -Wconversion-null warning (on by default with recent
GCC).
2018-04-03 18:01:58 +12:00
Olly Betts
5f5ab92d5e Fix typo 2018-04-03 17:44:51 +12:00
Joel Anderson
a1cea4f483 Fix ruby %alias directive for native c functions
Using the %alias directive on native C functions causes swig to segfault due to
a dereference of klass (which is NULL for native C functions) in the
defineAliases function of the Ruby module. This commit adds support for an alias
of native C functions for both separate module as well as global functions, as
well as three test cases for the %alias directive of the Ruby module.

Fixes:
mod.i
%module ruby_alias
%alias get_my_name "nickname,fullname";
%inline %{
const char *get_my_name(){
  return "Chester Tester";
}
%}
$ swig -ruby mod.i
Segmentation fault

Signed-off-by: Joel Anderson <joelanderson333@gmail.com>
2018-03-22 08:05:01 -04:00
William S Fulton
6fac581a2b Stop testing Python on Appveyor msys/mingw
I can't get python2 nor python3 to work with recent platform changes
at Appveyor. Just compile SWIG binary for now.
2018-03-20 07:44:00 +00:00
William S Fulton
9b44d1bb7e Fix -Wimplicit-fallthrough gcc-7.3 warning 2018-03-20 00:19:41 +00:00
William S Fulton
b5796019e0 Remove deprecated autoconf macros
AC_EXEEXT AC_OBJEXT are deprecated in the minimum autoconf version we use:
2.58. The compiler checking macros do the equivalent now.
2018-03-14 18:03:52 +00:00
William S Fulton
98ebd56942 Remove c++11 override in testcase 2018-03-09 18:27:16 +00:00
William S Fulton
b4f4ce4fd5 Fix Java swigReleaseOwnership() and swigTakeOwnership() regression
Fixes segfault when using non-director classes.
Restores a dynamic_cast which was previously removed.
The dynamic_cast is not needed for the swig_connect_director call ...
we'll have to find another solution for #449 for Java.

Closes #1184
2018-03-09 08:13:41 +00:00
William S Fulton
3ce3ce0683 Add std_shared_ptr.i for Scilab and R as boost_shared_ptr.i is already available 2018-03-09 06:58:08 +00:00
William S Fulton
60ee821bca Correct C# warning for missing cstype typemap 2018-03-09 06:58:08 +00:00
Olly Betts
1915740af8 preproc.i: Also note URL for "// in macro" PR 2018-03-08 06:12:01 +13:00
Olly Betts
ba3773e1be preproc.i: Shorten classname for scilab
Errors were:

../../../../../../Examples/test-suite/scilab/../preproc.i:400: Error: Wrapping functions names for member 'tcxMessageTestSlashSlash.mHeader' will exceed 24 characters, please rename the container of member 'tcxMessageTestSlashSlash'.
../../../../../../Examples/test-suite/scilab/../preproc.i:408: Error: Wrapping functions names for member 'tcxMessageBugSlashSlash.mBid' will exceed 24 characters, please rename the container of member 'tcxMessageBugSlashSlash'.
2018-03-08 06:10:08 +13:00
Olly Betts
538ce62775 Add CHANGES.current entry for previous fix 2018-03-07 14:50:42 +13:00
Olly Betts
d5e012f70f Add test coverage for // comment fix 2018-03-07 14:49:08 +13:00
Luca Longinotti
30719feaf9 Fix handling of // comments inside macro arguments
/* */ are already handled correctly.

This completes the fix from commit
624ec3e1b7 related to swig/swig#974.
2018-03-07 14:49:08 +13:00
William S Fulton
d4badb3e1d
Travis OSX Python 3 build fix for recent changes in brew 2018-03-03 14:31:03 +00:00
William S Fulton
e435f3b93b Document command-line options file support in changes file 2018-02-18 21:12:10 +00:00
William S Fulton
e9ee1014e7 Merge branch 'JPEWdev-via-file'
* JPEWdev-via-file:
  Add documentation for option files
  Add option file support
  Terminate options when passed via env var
2018-02-18 20:58:20 +00:00
William S Fulton
7fbdd21b49 Javascript - Fix compilation error wrapping std::complex via std_complex.i
Closes #1187
2018-02-11 11:12:24 +00:00
William S Fulton
449ba627f5 Typo fix in SWIGPlus.html docs 2018-02-07 23:07:22 +00:00
Simon Marchetto
1647135369 [scilab] fix compilation (checked with the additional compiler options) 2018-02-01 14:31:52 +01:00
Simon Marchetto
7a9ee39412 [Scilab] fix compilation error 2018-02-01 10:09:35 +01:00
Simon Marchetto
862501480e add type name argument in SWIG_ptr() function to cast from pointer adress to typed pointers 2018-01-30 16:34:31 +01:00
William S Fulton
72964a1faf Don't accept some invalid preprocessor code
Whitespace or non-numeric characters are required after a preprocessor
directive that requires an expression.
2018-01-16 08:07:37 +00:00
William S Fulton
532999f4f2 Improve error message when preprocessor expressions result in a floating point constant
Instead of a syntax error, the error is now:
  Warning 202: Error: 'Floating point constant in preprocessor expression'
2018-01-15 08:09:14 +00:00
William S Fulton
ea5b55ecf4 Fix floating point division by zero in preprocessor expressions.
Closes #1183
2018-01-15 07:51:18 +00:00
William S Fulton
07a30249f4 Fix seg fault parsing invalid exponents
Add error message when exponents are incomplete,
for example 5e and 5.e
2018-01-14 19:36:09 +00:00
William S Fulton
9b0e06a8e8 Seg fault fix running uffi tests 2018-01-14 13:27:01 +00:00
William S Fulton
ab5559f51c Fix out of bounds memory problems in handling simple macro arguments
Fixes handling macro in swigmacros.swg:
  #define %arg(Arg...)        Arg

AddressSanitizer error running Python test-suite.
2018-01-14 13:25:57 +00:00
William S Fulton
af8d176c40 java_throws testcase warning fix 2018-01-12 23:10:02 +00:00
Joshua Watt
bc89aad59f Add documentation for option files 2018-01-12 15:01:45 -06:00
Joshua Watt
e9b4d3378b Add option file support
Arguments may be passed using an option file prefixed with the '@'
character. Processing of option files is the same as for the same
feature in gcc.
2018-01-12 15:01:45 -06:00
William S Fulton
368cd3b52c Add ToArray test for C# std::vector wrapper 2018-01-12 18:26:47 +00:00
William S Fulton
6227013da4 Merge branch 'master' of https://github.com/Liryna/swig into Liryna-master
* 'master' of https://github.com/Liryna/swig:
  [C#] Add ToArray to std_vector.i
2018-01-12 18:02:33 +00:00
William S Fulton
6ec5d03947
Merge pull request #1142 from jder/csharp-doc-fix
Copy over Java documentation changes on possible GC issues to C# docs
2018-01-12 07:52:20 +00:00
William S Fulton
49af1907b8 Add missing Java throws clause for interfaces when using the %interface family of macros.
Fixes #1156.
2018-01-12 07:34:32 +00:00