William S Fulton
e6035d625a
Java 9 deprecation warning fixes for test-suite and examples
2019-02-21 13:47:39 -08:00
William S Fulton
6d8c1c47f3
Merge branch 'java9_finalize_warnings'
...
* java9_finalize_warnings:
[Java] Suppress deprecation warning on finalize method
2019-02-21 13:46:59 -08:00
William S Fulton
2786bf37a1
Fix multiple definitions of swig::container_owner_attribute
2019-02-21 17:57:11 +00:00
Zachary Hensley
1e571417b6
Updated java std_map to support Obj derivatives by importing original for use in class
2019-02-21 09:24:41 -06:00
Zackery Spytz
1c03af9b96
Fix some rejections of valid floating-point literals
...
Some valid floating-point literals were giving
"Error: Syntax error in input(1)".
2019-02-21 02:11:51 -07:00
William S Fulton
32b963ef1c
Re-organise Python method creation and docstring functions declarations
...
Fix ‘PyMethodDef* SWIG_PythonGetProxyDoc(const char*)’ declared ‘static’ but
never defined [-Wunused-function]
Closes #1448 (again)
2019-02-19 22:54:08 +00:00
William S Fulton
1f46d9b7b9
Fix regression parsing gcc preprocessor linemarkers
...
These are preprocessor statement in the form:
# linenum filename flags
Closes #1475
2019-02-19 21:32:04 +00:00
Zackery Spytz
1eb9cd3211
[OCaml] Move INPUT, OUTPUT, and INOUT typemaps to typemaps.i
2019-02-18 23:02:20 -07:00
Zackery Spytz
092c51c06e
[OCaml] Rename typemaps.i to ocaml.swg
2019-02-18 22:42:20 -07:00
Zackery Spytz
b74b2189e6
[OCaml] Rename ocaml.swg to ocamlrun.swg
...
Rename ocamldec.swg to ocamlrundec.swg.
2019-02-18 22:35:55 -07:00
Zackery Spytz
5a58f9a87b
Merge remote-tracking branch 'upstream/master' into OCaml-INPUT-OUTPUT-INOUT-primitives
2019-02-18 20:41:13 -07:00
William S Fulton
9038a9987d
Add std::vector back reference test
2019-02-18 21:39:17 +00:00
William S Fulton
f19882ed51
Merge pull request #1473 from ZackerySpytz/OCaml-wrapmacro-test
...
[OCaml] Fix the wrapmacro test
2019-02-18 19:33:22 +00:00
William S Fulton
911bc5310f
Merge pull request #1472 from ZackerySpytz/OCaml-SWIGTYPE-typecheck
...
[OCaml] Add a typecheck typemap for SWIGTYPE
2019-02-18 19:31:50 +00:00
William S Fulton
be9d736597
Add back-reference to changes file
2019-02-18 19:28:35 +00:00
William S Fulton
a628bf9b6f
Python std::vector back-reference changes
...
Give reference in container_owner a more unique name (back_reference).
Change back-reference 'ret' typemap to have a function name so that they
are less unwittingly be used elsewhere where not intended.
Note that they can be overridden by users if needed using:
%extend std::vector {
%typemap(ret)
value_type const& __getitem__,
value_type const& front,
value_type const& back
{ ... }
}
These override the SWIG supplied versions because the SWIG supplied
typemaps use non-const value_type&, but the methods use const, so the
above have a higher precedence in the typemap search algorithm.
2019-02-18 18:50:22 +00:00
Zackery Spytz
470ce2dd31
[OCaml] Add missing INPUT, OUTPUT, and INOUT typemaps for primitives
...
The typemaps are based on PHP's.
2019-02-18 04:23:40 -07:00
William S Fulton
b634905b65
Merge branch 'jakecobb-python-container-memory'
...
* jakecobb-python-container-memory:
Better name for container back-reference attribute
Python - Struct spec. for container owner
Python: Avoid container owner check for value types
Python: Init container owner attribute in thread-safe way
Python: Use PyObject_SetAttr instead of PyObject_GenericSetAttr for back-ref
Python: Cleanup container back ref
Python: Keep reference to owning container during element access
2019-02-18 07:11:19 +00:00
William S Fulton
b9350614b5
Fix typemap matching to expand template parameters when the name contains template parameters.
...
In the %typemap below the type is T and the name is X<T>::make
which now expands correctly to X< int >::make
template<typename T> struct X {
%typemap(out) T X<T>::make "..."
T make();
};
%template(Xint) X<int>;
2019-02-17 21:38:48 +00:00
William S Fulton
024eaeaacf
Improve debug display of parameters
...
Debug display now displays parameters as strings for "kwargs", "pattern",
"templateparms", "throw" elements in the parse tree (not just "parms"
and "wrap:parms").
Add in single quotes when displaying these parameter lists as strings.
2019-02-17 20:03:23 +00:00
William S Fulton
629c881de5
Template instantion fixes when template parameter is used twice in type
...
For example T in:
Y<T>::YYY<T>::value_type
2019-02-17 20:03:18 +00:00
Zackery Spytz
10d62aecd5
[OCaml] Fix the wrapmacro test
...
Add a typecheck typemap for size_t and const size_t &.
Add the const qualifier to the typemaps for primitive reference
types.
Add multiple runtime tests.
2019-02-17 01:41:59 -07:00
William S Fulton
de861bea64
Memory leak fixes calling Swig_scopename_split
2019-02-16 13:06:43 +00:00
William S Fulton
eb7b989c61
Fix parser error containing multiple #define statements inside an enum.
...
The second #define fails to parse:
enum FooEnum {
ENUM1 = 0,
ENUM2 = 1,
#define MACRO_DEF1 "Hello"
#define MACRO_DEF2 "World!"
ENUM3 = 2,
ENUM4 = 3,
};
Bug mentioned at https://sourceforge.net/p/swig/patches/333/
2019-02-16 08:09:56 +00:00
Zackery Spytz
b7a400f991
[OCaml] Add a typecheck typemap for SWIGTYPE
...
This fixes many of the remaining warnings in the OCaml test suite.
Add multiple runtime tests.
2019-02-16 01:07:31 -07:00
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
William S Fulton
6522afe90a
Merge pull request #1471 from ZackerySpytz/OCaml-segfaults-list-args
...
[OCaml] Fix segfaults when too few arguments are passed to a function
2019-02-15 19:14:45 +00:00
William S Fulton
1f4b3a4553
Merge pull request #1470 from ZackerySpytz/OCaml-dynamic_cast-test
...
[OCaml] Fix the dynamic_cast test
2019-02-15 19:10:15 +00:00
William S Fulton
7139cbc537
Merge pull request #1467 from ZackerySpytz/OCaml-exception-docs-improve
...
[OCaml] Some documentation improvements for %exception
2019-02-15 19:08:42 +00:00
William S Fulton
dd8c3e1466
Merge pull request #1461 from ZackerySpytz/OCaml-argout-typemaps-ref-types
...
[OCaml] Don't use argout typemaps by default for some reference types
2019-02-15 19:06:05 +00:00
William S Fulton
e04da08093
Merge pull request #1469 from ZackerySpytz/cpp17-hexadecimal-floating-literals
...
Add support for C++17 hexadecimal floating literals
2019-02-15 18:58:51 +00:00
William S Fulton
b0f105fa9f
Merge branch 'master' into cpp17-hexadecimal-floating-literals
2019-02-15 18:57:25 +00:00
Zackery Spytz
071803f000
[OCaml] Fix segfaults when too few arguments are passed to a function
...
Prevent segfaults when too few arguments are passed to a function.
Length checks are not needed for the wrappers of overloaded
functions -- the generated dispatch function already checks.
Add default_args_runme.ml.
Fix minor errors in some runtime tests. Extra args were being passed
in some cases.
2019-02-15 01:17:15 -07:00
William S Fulton
7b0402f89b
Changes file entry for Java STL support
2019-02-14 22:46:20 +00:00
William S Fulton
52063a732b
Consistent parameter names for std::pair
2019-02-14 22:44:27 +00:00
William S Fulton
a6a50d60e1
Restore original std::map template parameters for Java
2019-02-14 21:41:08 +00:00
William S Fulton
6d27ead9c0
Add STL container copy constructors where missing
...
Also provide consistent copy constructor declarations.
2019-02-14 18:53:05 +00:00
Zackery Spytz
a159a252dd
[OCaml] Fix the dynamic_cast test
...
Add out typemaps for SWIGTYPE *DYNAMIC and SWIGTYPE &DYNAMIC.
Add dynamic_cast_runme.ml.
2019-02-14 02:21:36 -07:00
William S Fulton
dc34c39c53
Cosmetic STL typedef changes
2019-02-14 08:16:16 +00:00
William S Fulton
40d7f4137e
typedef declaration corrections for std::array
2019-02-14 07:38:49 +00:00
William S Fulton
440264e479
Add missing typedefs to std::list + typedef corrections
...
Numerous missing typedefs added.
std::list<T*>::const_reference and std::list<T*>::reference
specialization typedef fixes.
2019-02-14 07:31:21 +00:00
William S Fulton
e26f6bb4e2
Add missing typedefs to std::vector + typedef corrections
...
Tests for std::vector of pointers added which check
std::vector<T*>::const_reference and std::vector<T*>::reference
usage which gave compilation errors in Python and Perl which had
specialized these vectors incorrectly.
2019-02-13 22:46:28 +00:00
William S Fulton
a47c2553f5
Add missing typedefs to std::pair
2019-02-13 22:46:28 +00:00
William S Fulton
9dd33e6367
Add missing typedefs to std::map
2019-02-13 22:46:27 +00:00
William S Fulton
1f44997343
rename std::array testcase
2019-02-13 22:46:20 +00:00
William S Fulton
6d0c495fd0
Add missing parameter names in STL container wrappers
...
Mostly in STL copy constructors.
Best to have parameter names as they make their way into the wrappers in
some target languages.
2019-02-13 22:45:47 +00:00
Zackery Spytz
cf83adfcd1
Add support for C++17 hexadecimal floating literals
2019-02-13 15:16:40 -07:00
Zackery Spytz
506be0c28c
[OCaml] Some documentation improvements for %exception
...
Use the style of the Java and Python modules.
Tweak some entries in CHANGES.current.
[skip ci]
2019-02-12 19:43:55 -07:00
William S Fulton
8c207dd3a9
Merge branch 'master' of git+ssh://github.com/swig/swig
...
* 'master' of git+ssh://github.com/swig/swig:
[Python] Fix some errors in the documentation for -threads
Fixed typo in Perl5 docs.
Update PHP testsuite for vadz's new cars
[php] Whitespace improvements in generated C/C++ code
Fix hardcoded _v in PHP typecheck typemaps
2019-02-12 18:53:46 +00:00
William S Fulton
68e86614ff
Create a consistent stl.i library file
...
Same file now for all languages except R which is still missing std_map.i.
Recent Java changes adding in std_set.i removed.
2019-02-12 18:46:05 +00:00