Commit graph

2,499 commits

Author SHA1 Message Date
Stefan Zager
e5bf6419b2 Test operator overloads with deep hierarchy.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12449 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-10 05:15:03 +00:00
Stefan Zager
5db5f109c7 python3 won't let you declare an 'except' clause for a non-throwable type, even if the clause is never executed.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-10 05:05:14 +00:00
Stefan Zager
6fa3033971 Makefile tweaks
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12445 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-09 07:35:56 +00:00
Stefan Zager
25be33dcd4 A collection of performance tests. The variants we're most
interested in are:

- swig run without any special parameters
- swig run with -O
- swig run with -builtin



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12444 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-09 07:31:08 +00:00
Stefan Zager
f39c09e12d Whoops; bad import
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12443 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-09 07:28:54 +00:00
Stefan Zager
460ac6206a A place to write and run performance tests. The variants we're
most interested in are:

'baseline' -- swig run without any special flags
'optimized' -- swig run with -O flag
'builtin' -- swig run with -builtin flag




git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12442 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-09 07:26:07 +00:00
Stefan Zager
52a807ce95 Merged trunk up to revision 12426
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12427 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-03 19:30:45 +00:00
Stefan Zager
cd93c7362e Applied patch #3171793 to fix -fvirtual. Mostly disabled python_abstractbase, since builtin types can't inherit from pure-python ABC's. Duck typing still works.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12426 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-03 18:10:39 +00:00
Stefan Zager
62fef1bf99 python3 support; passes all regressions.
Adding argcargvtest_runme3.py, because 2to3 can't handle it.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12425 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-03 07:21:37 +00:00
William S Fulton
a0b869da38 Remove runtime warnings in overloading php example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 19:58:44 +00:00
William S Fulton
e7e542ffc9 li_boost_shared_ptr.i testcase - fix for missing %shared_ptr highlighted by new smart pointer warning 520
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12421 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 19:14:14 +00:00
William S Fulton
af4873f879 Linker errors fixed for member_funcptr_galore testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12420 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 07:17:51 +00:00
William S Fulton
4a73d986dd Any 'using' statements in the protected section of a class were previously ignored with dirprot mode, certainly with Java and C#. Also directors - a call to a method being defined in the base class, not overridden in a subcalss, but again overridden in a class derived from the first subclass was not being dispatched correcly to the most derived class - affecting non-scripting languages. Fix for C# is based on recent fix for D.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 07:02:50 +00:00
Stefan Zager
9c796f0333 Merged changes from trunk up to revision 12416.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12417 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 05:24:00 +00:00
Stefan Zager
002598680e This commit contains all changes to the regression tests which
are necessitated by the -builtin option.  Notes on individual tests
follow.

grouping_runme.py : 'cvar' syntax for class variables is obsolete.

li_std_string_extra_runme.py :
li_std_wstring_runme.py : Reverse binary operators (e.g., __radd__)
are not supported.

threads_exception_runme.py :
director_exception_runme.py :
exception_order_runme.py : Throwing wrapped objects as exceptions
is not supported.

default_constructor_runme.py : Redundant functional interface
(e.g., 'module.new_Foo()' for 'module.Foo()') is not provided.

python_nondynamic_runme.py : I believe that this test script doesn't
actually test the %pythonnondynamic feature correctly, and I believe
that the feature itself is implemented incorrectly.  With the -builtin
option, %pythonnondynamic *is* implemented correctly, and I have
modified the test script to exercise it correctly.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 04:13:58 +00:00
William S Fulton
640cce2c50 Fix typecheck typemaps for SWIGTYPE *const&
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12413 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 00:42:27 +00:00
William S Fulton
17ad110543 Add li_typemaps_apply to tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12410 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-29 21:53:16 +00:00
David Nadlinger
b9d12afa7c [D] Test C++ references in »d_nativepointers«; normalized indentation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12407 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-29 21:32:11 +00:00
William S Fulton
3d822b6032 expand protected using testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12404 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-28 19:50:57 +00:00
William S Fulton
2f0dc16b2e Fix C# typemaps.i so that %apply works doesn't break function returns using the same types, for example, %apply int &INPUT { int & } won't break 'int &foo(int &x);'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12400 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-24 19:27:06 +00:00
William S Fulton
2a449306f1 Fix D test-suite clean
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12399 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-18 06:53:59 +00:00
William S Fulton
a440369e35 Move a couple of runme files which into the correct directories
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12397 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-17 21:25:04 +00:00
William S Fulton
5d99aa7864 Remove svn:executable property
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12396 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-17 21:20:29 +00:00
William S Fulton
3d7799fe0d New warning when the smartptr feature is missing in some classes in an inheritance chain. Errors test-suite now uses Python instead of Tcl as testing language
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12395 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-17 21:12:35 +00:00
Ian Lance Taylor
ef3644f052 Add string & length typemap for Go.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12394 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-14 21:31:36 +00:00
William S Fulton
ef865e06d5 Added some missing multi-argument typemaps: (char *STRING, size_t LENGTH) and (char *STRING, int LENGTH) - Java patch is from Volker Grabsch. Elements of the primitive_types.i testcase for this moved into char_binary.i. Documentation for this enhanced.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12393 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-14 19:06:43 +00:00
William S Fulton
9adb494558 Unused runtest removed
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12391 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-11 20:00:01 +00:00
Ian Lance Taylor
6ce1f70de8 Fix to work with Go when using the gccgo compiler.
The gccgo compiler permits a Go exception to be caught in C++ and
vice-versa.  Add a rethrow to avoid this case.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-11 18:47:40 +00:00
Ian Lance Taylor
d25d8cea92 Fix %module declaration.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12387 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-11 00:00:16 +00:00
David Nadlinger
892caec201 [D] Fixed a bug in the loop breaking code for directors leading to a superclass implementation erroneously being called.
The situation in which this would previously happen is illustrated in the new "director_alternating" test case. Currently broken for C# and Java.

Thanks to Jimmy Cao for reporting this.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12380 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-08 21:05:49 +00:00
William S Fulton
cdc8d13ae6 Fix rname testcase when run under OpenJDK icedtea on Linux because libjvm.so also contains a class called Base. Also remove need for Go specific handling in this testcase.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12372 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-05 21:15:10 +00:00
David Nadlinger
a344899ed8 [D] Added workaround for LDC to the D1 version of the 'funcptr' example.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12361 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-01 14:34:51 +00:00
David Nadlinger
0c3f855cc9 [D] Not only build, but also run the examples for the 'check' target.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12360 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-01 14:23:47 +00:00
David Nadlinger
91523f7510 [C#, D, Java] Check for collision of parameter names with target language keywords when generating the director glue code.
The situation in which the generated could would previously be invalid is illustrated in the new 'director_keywords' test case.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12358 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-30 15:40:17 +00:00
David Nadlinger
38c88a0931 [D] Operator overloading support for D1 and D2.
As mentioned in the documentation, opIndexAssign and implicit casting are not supported yet.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12357 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-30 02:44:04 +00:00
William S Fulton
7f4283f684 Fix special variable not being expanded for csvarin typemaps when used for global variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12354 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-23 20:27:34 +00:00
Olly Betts
c6f3ac5420 Fix typo in code (found by cppcheck)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12352 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-16 12:54:01 +00:00
William S Fulton
8f1bde9d81 Fix expansion in array typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12347 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-14 21:38:36 +00:00
William S Fulton
93b030ec6a Fix wallkw runtime test since D was added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-08 19:58:19 +00:00
William S Fulton
64852460a0 Fix wallkw runtime test since D was added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12338 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-08 19:56:14 +00:00
William S Fulton
32769435fd More extensive member function pointer test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12336 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-08 19:35:03 +00:00
David Nadlinger
7903475571 [D] Workaround for an argument handling discrepancy between DMD and LDC.
See http://dsource.org/projects/ldc/ticket/380 for the corresponding LDC ticket.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12335 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-08 16:58:14 +00:00
David Nadlinger
e120dfcc70 D compiler sanity checks in configure; check D2 by default if no D1 compiler can be found.
For both D1 and D2, if the compiler has not been specified explicitly via a command line option, the configure script tries to compile a minimal program stub. Only if this succeeds, the respective compiler is enabled.

If neither a working D1 nor a working D2 compiler has been found, D is skipped completely as usual.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12334 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-08 16:57:55 +00:00
David Nadlinger
3477a9dff1 [D] Replaced the term "wrap D module" with "intermediary D module" (including names derived from it).
This was suggested by wsfulton on the mailing list in order to bring the D module in line with the C# one, the naming scheme of which is intended to be language-independent.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12319 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-28 23:12:03 +00:00
David Nadlinger
a22df2eca9 [D] Refer to the built-in Exception class using its fully-qualified name.
A C++ class called "Exception" could shadow the built-in one before, leading to compilation errors in the exception handling code.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12318 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-27 00:13:44 +00:00
William S Fulton
b89248404d Remove generated files from svn for Go examples
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12316 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-26 20:32:23 +00:00
David Nadlinger
d69d8ff641 [D] Renamed the "dnativeconst" feature to "dmanifestconst".
This should make it clearer that it controls manifest constant generation, not handling of C++ const member functions.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12300 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 10:16:05 +00:00
David Nadlinger
03aefbc6e9 Added support for the D programming languge.
It is still a bit rough around some edges, particularly with regard to multi-threading and operator overloading, and there are some documentation bits missing, but it should be fine for basic use.

The test-suite should build and run fine with the current versions of DMD, LDC and Tango (at least) on Linux x86_64 and Mac OS X 10.6.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12299 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 00:24:02 +00:00
David Nadlinger
a355d2d46a Added special cases to the test-suite as required for D.
This is a part of the pending merge of the D module.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12298 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 00:17:37 +00:00
David Nadlinger
2070812f09 Minor rename in the 'operbool' test-case to avoid special casing for D.
This is a part of the pending merge of the D module, where a method having the same name as the module would lead to ambiguities.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12297 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 00:16:23 +00:00