Commit graph

16,359 commits

Author SHA1 Message Date
Emmanuel Julien
cf370fb504 Fix class member division operator.
Define the nb_divide/nb_inplace_divide slots in the interface and use it them as nb_divide/nb_inplace_divide for Python 2.x and as nb_true_divide/nb_inplace_trus_divide for Python 3.x.

The Python 3.x nb_floor_divide/nb_inplace_floor_divide slots (operator // in Python) are not populated by the interface.
2016-02-22 14:54:19 +01:00
Emmanuel Julien
6fca1ee0b0 Remove the PY3BUILTIN switch as its behavior can be achieved with the existing SWIG_FEATURES=-builtin switch. 2016-02-19 12:16:00 +01:00
Emmanuel Julien
779ed2cd7a Implement the operator overload test suite for Python.
This suite fails on Python 3 (with and without -builtin) due to the following issues:

- Operator / is mapped to the div slot which is now truediv in Python3 (see PR #136 for a WIP fix).
- Operators +=, -=, *= and probably others assign the method return type (void) to the object they are applied on. A workaround is to return *this from the affected operators.
2016-02-19 00:18:39 +01:00
William Fulton
05f92e9fbd Release scripts to release from any branch 2014-02-09 23:19:17 +00:00
William S Fulton
3cf3be24ab mkdist script tweaks to support releasing from any named branch 2014-02-08 11:08:56 +00:00
William S Fulton
98364d46da Merge branch 'wkalinin-nested-ignore'
* wkalinin-nested-ignore:
  Restore warning suppression in testcase
  Typo in comment fix
  warnings suppressed for deeply nested classes
  nested nested class warning filtered
  warning filter fixed
  error order foxed
  WARN_PARSE_UNNAMED_NESTED_CLASS check fixed
  more warnings removed
  warnfilter fixed scoping for "anonymous forward declaration" fixed
  %feature ("flatnested") is set for nested scope test
  added forward declaration instead of ignored nested class (resurrected old code)
  filtered warnings, turned on "flatnested" for nested template test
  Nested classes support is diversified, depending on the language capability. If the language cannot support nested classes, they will be unconditionally moved to the global namespace. If language module does not override Language::nestedClassesSupport() function, nested classes will be ignored, unless "feature:flatnested" is used.
2014-02-08 10:34:05 +00:00
William S Fulton
88de9f1610 Restore warning suppression in testcase 2014-02-08 09:45:20 +00:00
William S Fulton
3518cbfd33 Typo in comment fix 2014-02-08 09:00:52 +00:00
Vladimir Kalinin
e9ecac9298 warnings suppressed for deeply nested classes 2014-02-07 07:39:07 +04:00
William S Fulton
b457f8f290 Changes entry for guile non-ascii strings fix 2014-02-06 20:02:05 +00:00
William S Fulton
09bdc5f353 Merge branch 'master' of https://github.com/gjanssens/swig into gjanssens-master
* 'master' of https://github.com/gjanssens/swig:
  Guile: make scm to string conversion work with non-ascii strings
  Guile: illustrate bug in non-ascii string handling
2014-02-06 19:58:09 +00:00
Vladimir Kalinin
6b5e366567 nested nested class warning filtered 2014-02-06 23:53:33 +04:00
Vladimir Kalinin
56cea1821d warning filter fixed 2014-02-06 23:47:01 +04:00
William S Fulton
844695b674 Fix typedef_typedef test 2014-02-06 19:31:31 +00:00
Geert Janssens
c6d03a6a9f Guile: make scm to string conversion work with non-ascii strings 2014-02-05 12:17:16 +01:00
Geert Janssens
a54674eeca Guile: illustrate bug in non-ascii string handling 2014-02-05 12:17:05 +01:00
Vladimir Kalinin
54b2346c71 error order foxed 2014-02-05 02:30:48 +04:00
William S Fulton
0383d08444 Add new swigtype_inout.i library containing SWIGTYPE *& OUTPUT typemaps. 2014-02-04 06:54:22 +00:00
William S Fulton
87c1e093ee Travis display pcre version 2014-02-04 06:54:21 +00:00
Vladimir Kalinin
b7fd1eacb2 WARN_PARSE_UNNAMED_NESTED_CLASS check fixed 2014-02-03 02:50:19 +04:00
Vladimir Kalinin
0320378387 more warnings removed 2014-02-03 02:31:17 +04:00
Vladimir Kalinin
bda9c90e2b warnfilter fixed
scoping for "anonymous forward declaration" fixed
2014-02-03 02:21:44 +04:00
Vladimir Kalinin
8fc4fd2893 %feature ("flatnested") is set for nested scope test 2014-02-03 01:15:05 +04:00
Vladimir Kalinin
4744ea8903 added forward declaration instead of ignored nested class (resurrected old code) 2014-02-03 01:03:37 +04:00
Vladimir Kalinin
69d849b56c filtered warnings, turned on "flatnested" for nested template test 2014-02-02 23:38:23 +04:00
Vladimir Kalinin
2f3d93e93a Nested classes support is diversified, depending on the language capability. If the language cannot support nested classes, they will be unconditionally moved to the global namespace. If language module does not override Language::nestedClassesSupport() function, nested classes will be ignored, unless "feature:flatnested" is used. 2014-02-02 22:38:13 +04:00
VZ
2c87cee65a Merge pull request #129 from vadz/warn-fix
Fix gcc strict aliasing warnings with function pointers too.
2014-02-01 09:10:02 -08:00
Vadim Zeitlin
a1fe8a6501 Fix gcc strict aliasing warnings with function pointers too.
The commit 40bf877 fixed warnings about converting between function and object
pointers but introduced warnings about breaking strict-aliasing rules which
appear with -Wstrict-aliasing which is implicitly enabled by -O2.

Avoid these warnings as well by using an intermediate union for conversion
instead of casts trickery.
2014-02-01 15:00:15 +01:00
Ian Lance Taylor
fa9a6d58ed [Go] Fix handling of C type "long" on 32-bit systems. It was broken
for C++ long& and for big-endian systems in general.
2014-01-27 17:49:35 -08:00
Ian Lance Taylor
f2dc3a9c1f [Go] Add %go_import directive. 2014-01-21 11:27:09 -08:00
Ian Lance Taylor
3785454a87 [Go] Add support for Go 1.3, not yet released. 2014-01-21 11:18:55 -08:00
William S Fulton
cc650e692e Director exceptions now derive from std::exception 2014-01-20 19:40:52 +00:00
William S Fulton
af6bee1e8c Travis build fixes for checking 'make install' 2014-01-19 22:09:52 +00:00
William S Fulton
e323d9d7b3 Add 'make install' to Travis testing 2014-01-19 20:45:22 +00:00
William S Fulton
d7e614f716 Remove debug output on 'Empty character constant' error 2014-01-19 00:23:42 +00:00
William S Fulton
3055a21505 Errors test-suite overhaul
Use makefiles instead of a make.sh script
Expected results are in individual .stderr files instead of the expected.log file
Add errors test-suite to Travis testing and 'make check'
2014-01-19 00:12:12 +00:00
William S Fulton
9d003ab362 Update errors expected results 2014-01-16 19:30:48 +00:00
William S Fulton
f068be89e5 Fix PHP compilation error in ZTS mode (64 bit windows) due to TSRMLS_FETCH() expansion 2014-01-16 06:48:35 +00:00
William S Fulton
9033b2de47 Merge branch 'diorcety-typedef-prefix'
* diorcety-typedef-prefix:
  Modify typedef_typedef testcase to work for all languages
  Add test for checking prefix resolving in typedef
  Typedef typedef prefix test for templates
  Resolve prefix when resolving typedef

Conflicts:
	CHANGES.current
2014-01-14 07:31:40 +00:00
William S Fulton
e531578c54 Modify typedef_typedef testcase to work for all languages
Add CHANGES note

Closes #112.
2014-01-14 07:21:40 +00:00
Yann Diorcet
2e186244d6 Add test for checking prefix resolving in typedef 2014-01-14 07:21:40 +00:00
William S Fulton
2f47bb8d67 Typedef typedef prefix test for templates
As given in Diorcet Yann's example in issue #50
2014-01-14 07:20:06 +00:00
Karl Wette
5b167cc12d octave: update support to Octave version 3.8.0 2014-01-13 18:24:17 +13:00
Yann Diorcet
c319ad9dd6 Resolve prefix when resolving typedef 2014-01-12 00:17:16 +00:00
William S Fulton
5c6bc5db3e Remove -nonaturalvar and nonaturalvar option in %module
These didn't work, were not documented and don't seem necessary
2014-01-11 19:34:44 +00:00
William S Fulton
07ce3fb746 Add testcase for %attributestring on shared_ptr 2014-01-11 19:34:22 +00:00
William S Fulton
c34d7f6d23 %naturalvar feature fixes and documentation
Fix and document the naturalvar feature override behaviour - the naturalvar
feature attached to a variable name has precedence over the naturalvar
feature attached to the variable's type. The overriding was not working
when turning the feature off on the variable's name.

Fix so that any use of the naturalvar feature will override the global
setting. Previously when set globally by -naturalvar or %module(naturalvar=1),
use of the naturalvar feature was not always honoured.
2014-01-11 19:32:43 +00:00
William S Fulton
e702093c70 Template private assignment testcase
This is broken and needs fixing at some point.
Problem reported by Pierre-Henri Wuillemin on swig-devel mailing list.
2014-01-11 17:39:47 +00:00
William S Fulton
0c1058511b Merge pull request #126 from vadz/warn-fix
Work around gcc warning about function pointers conversions.
2014-01-11 09:39:24 -08:00
Vadim Zeitlin
40bf877499 Work around gcc warning about function pointers conversions.
Work around harmless (at least under POSIX systems where function pointers are
guaranteed to have the same representation as object pointers) but annoying
warnings given by gcc when converting between function and object pointers, e.g.

Source/DOH/fio.c: In function 'DohEncoding':
Source/DOH/fio.c:51: warning: ISO C forbids conversion of function pointer to object pointer type
Source/DOH/fio.c: In function 'encode':
Source/DOH/fio.c:75: warning: ISO C forbids conversion of object pointer to function pointer type
Source/DOH/base.c: In function 'DohCall':
Source/DOH/base.c:952: warning: ISO C forbids conversion of object pointer to function pointer type

Use an extra level of pointer indirection to avoid them.
2014-01-10 14:38:54 +01:00