Commit graph

20,122 commits

Author SHA1 Message Date
William S Fulton
e8ebadcded Add director shared_ptr typemaps for Java
Correct testcase to test T*const& rather than T*& typemaps
2017-10-16 18:21:31 +01:00
William S Fulton
6470fe8c36 Director shared_ptr typemaps for scripting languages
Modify the Python and Ruby director shared_ptr typemaps to be language neutral.
Port the director modifications to other scripting languages that
have shared_ptr support - Octave, R and Scilab. Scilab shared_ptr
support is not fully working and needs work though.
2017-10-13 07:34:38 +01:00
William S Fulton
fcd7ecd9e2 R memory handling standardisation
Replace R_SWIG_EXTERNAL and R_SWIG_OWNER with the standard equivalent
macros. I can't see where these were actually used, but in case they are,
equivalent backwards compatibility can be obtained using:

  #define R_SWIG_EXTERNAL 0
  #define R_SWIG_OWNER SWIG_POINTER_OWN

SWIG_MakePtr does not seem to be used within the R SWIG code base so I
havn't added the above as backwards compatibility macros.
There seems to be no memory management in R. I've made this change
to fit in with the rest of SWIG though in preparation for an upcoming
commit to use the same shared_ptr macros as is used elsewhere.
2017-10-13 07:34:38 +01:00
William S Fulton
114fab31a1 Scilab, R and Octave shared_ptr typemaps null fix
Merge changes from Python/Ruby equivalent files to obtain a fix
for NULL handling of T*const& typemaps.
2017-10-11 18:08:32 +01:00
William S Fulton
d0615d98a9 Merge branch 'radarsat1-fix-null-shared_ptr-directors'
* radarsat1-fix-null-shared_ptr-directors:
  Remove duplicate director shared_ptr pointer reference typemaps
  For shared_ptr directorin, make copy of shared_ptr in all cases.
  Add directorin typemap for Python and Ruby shared_ptr.
2017-10-11 09:03:01 +01:00
William S Fulton
a674edebf5 Octave and R shared_ptr typemaps update
Synchronize typemaps with other identical typemaps in Scilab/Ruby.
Adds some missing $disown support.
2017-10-11 08:33:02 +01:00
William S Fulton
000e63e0f8 Remove duplicate director shared_ptr pointer reference typemaps 2017-10-11 07:08:46 +01:00
William S Fulton
d72aca991f preproc testcase warning suppression for bad macro test 2017-10-10 19:26:54 +01:00
William S Fulton
e43dfc69e5 Precision loss warning fixes for C# std::complex<float> typemaps
For gcc -Wfloat-conversion and vc++ C4244 warnings
2017-10-10 19:26:54 +01:00
Joseph C Wang
be05daa39a change r to allow logical enums. add change to CHANGES.current 2017-10-10 17:50:58 +08:00
Joseph C Wang
810fb67e4e disable failing enum tests 2017-10-10 17:48:56 +08:00
William S Fulton
08210236ef Fix newobject3 testcase
Fixes Octave problem which has a template called product.
2017-10-10 08:05:21 +01:00
William S Fulton
e7f0c6d6ad Suppress Ruby std::wstring, std::string, std::basic_string warnings
Lib/std/std_basic_string.i:235: Warning 365: operator+= ignored
Lib/std/std_wstring.i:8: Warning 378: operator!= ignored

Correct 801 warning suppressions (which are normally suppressed in the test-suite):
Lib/std/std_wstring.i:13: Warning 801: Wrong class name (corrected to `Wstring')

Similarly for std::string when including basic_string.i class.
2017-10-10 07:52:10 +01:00
Joseph Wang
8c9b06c9c0 Merge pull request #1118 from ojwb/r-enum-improvements
[R] Improve handling of enums
2017-10-10 04:45:34 +08:00
William S Fulton
d6077129e4 Testcase changes to satisfy pep8 E742 and E743 checks
Closes #1110
2017-10-09 07:27:38 +01:00
William S Fulton
16481add8e Travis python builtin testing to include Python 3.6 and g++-6 2017-10-09 07:27:38 +01:00
Olly Betts
0ca47dd7cc CHANGES.current entry and regression test for previous commit 2017-10-09 11:09:58 +13:00
Olly Betts
0c56d0cb72 [PHP] Fix incorrect wrapper code generation
Fix code generated when there's a combination of overloading, parameters
with a default value and %newobject.  Fixes
https://sourceforge.net/p/swig/bugs/1350/
2017-10-09 10:40:27 +13:00
Olly Betts
8be1d0e03a Fix typo in manual 2017-10-09 09:06:05 +13:00
Olly Betts
5a9422d980 Remove GCJ support
GCC7 dropped GCJ.

Closes https://sourceforge.net/p/swig/bugs/823/
2017-10-09 08:32:01 +13:00
Olly Betts
59ebe27a95 Merge pull request #1111 from ojwb/empty-arglist-macros
Fix handling of macro with empty argument list
2017-10-08 15:34:37 +13:00
Olly Betts
0863eca5e7 Fix constants involved parenthesised char literals
Fixes https://sourceforge.net/p/swig/bugs/1168/
2017-10-08 13:43:02 +13:00
William S Fulton
5adc133369 Test c++14 with gcc-7 as test-suite isn't quite ready for c++17 2017-10-08 00:07:10 +01:00
William S Fulton
122642280c Travis test python-3.6 2017-10-07 23:56:37 +01:00
William S Fulton
6981abc440 Travis test gcc-7.2 and c++-17 2017-10-07 23:56:33 +01:00
Olly Betts
55ca36a016 Add CHANGES.current entry 2017-10-08 09:02:29 +13:00
Olly Betts
5d14a7d910 Add regression testcase 2017-10-08 09:02:29 +13:00
Olly Betts
f85d87a64c Fix bug with macro invocation with empty first arg
The first argument was being dropped in this case.
2017-10-08 09:02:28 +13:00
Olly Betts
866840f791 Fix handling of macro with empty argument list 2017-10-08 09:02:28 +13:00
William S Fulton
dcf8730cf3 Avoid can of worms testing minimum signed int value
Specifying the minimum 32 bit signed int value is not easily portable.
Remove min_32bit_int2 method, min_32bit_int1 provides runtime coverage.

g++ 32bit resulted in:
warning: this decimal constant is unsigned only in ISO C90

and some versions of clang++ resulted in:
error: integer literal is too large to be represented in type 'long' and is subject to undefined behavior under C++98, interpreting as 'unsigned long'; this literal will have type 'long long' in C++11 onwards [-Werror,-Wc++11-compat]
2017-10-07 15:04:19 +01:00
Olly Betts
2c1a5c5919 Add regression test for old fixed SF bug 2017-10-07 15:28:10 +13:00
Olly Betts
4236b1ec9e [R] Improve handling of enums
Partial fix for https://github.com/swig/swig/issues/1116 but this needs
more work.
2017-10-07 10:36:07 +13:00
William S Fulton
4a7976a5d8 Fix platorm inconsistency in Python default argument handling.
32 bit and 64 bit compiled versions of SWIG generated different Python files
when default arguments were outside the range of 32 bit signed integers.
The default arguments specified in Python are now only those that are in the
range of a 32 bit signed integer, otherwise the default is obtained from C/C++ code.

Closes #1108
2017-10-06 21:57:04 +01:00
William S Fulton
ac8331648f Testcase fix for clang 2017-10-05 15:38:51 +01:00
William S Fulton
4f4147a779 Remove unused SWIG_NO_OVERLOAD macro from testcases 2017-10-04 23:49:40 +01:00
William S Fulton
f4644d7c30 Run overload_complicated testcase
Was marked as broken, seems to work now
2017-10-04 20:43:44 +01:00
William S Fulton
bb7db846cc Run virtual_derivation testcase
Should have been added in c92d8c7cf7
2017-10-04 08:51:16 +01:00
William S Fulton
1a0ce21547 Run typemap_template_typedef testcase
Should have been added in aa2932f409
2017-10-04 08:16:10 +01:00
William S Fulton
7c1b60f340 Run python_threads testcase
Should have been added in f4a2470325
2017-10-04 08:05:14 +01:00
William S Fulton
5f9376bae4 Run default_args_c testcase
Should have been added in ddd1b38fa2
2017-10-04 07:11:02 +01:00
William S Fulton
afd986c577 Python - set errno for default args handling
errno needs setting otherwise a failed strol may result in subsequent
unnecessary code generation to use *args instead of actual default
argument values. Related to issue #1108.
2017-10-04 06:50:47 +01:00
William S Fulton
11a658db79 Correct changes file entries 2017-10-02 19:10:18 +01:00
William S Fulton
a55981b883 Fix C# std::complex pass by value typemaps 2017-10-02 19:07:24 +01:00
William S Fulton
e01cfd70c7 Add missing declaration for std::complex
Fixes missing type information for std::complex in scripting languages.
Closes #732.

Update Javascript and Octave complextest, although they don't actually
get run as they don't work
2017-10-02 19:07:24 +01:00
William S Fulton
8834047dcd Enhance -debug-csymbols and -debug-symbols to show siblings 2017-10-02 19:07:24 +01:00
Joseph C Wang
004a845a27 add changes to current 2017-10-01 09:53:13 +08:00
Joseph C Wang
f0acfcfb4b Merge branch 'r_fixes_2' of https://github.com/fschlimb/swig 2017-10-01 09:48:37 +08:00
William S Fulton
8ee11ad71a Add missing test - template_class_reuse_name 2017-09-29 23:30:27 +01:00
William S Fulton
e27a606335 Allow an instantiated template to have the same name as the C++ template name
For example, this is now possible:
  template<typename T> struct X { ... };
  %template(X) X<int>;
Closes #1100.
2017-09-29 23:28:04 +01:00
William S Fulton
d37e41fed8 Cosmetic variable name change in parser 2017-09-29 21:16:19 +01:00