Commit graph

2,470 commits

Author SHA1 Message Date
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
David Nadlinger
4d09774cef Minor rename in the 'smart_pointer_templatemethods' test-case to avoid special casing for D.
This is a part of the pending merge of the D module, where 'Object' is a keyword.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12296 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 00:16:02 +00:00
David Nadlinger
0fb77ce206 Renamed 'template' test-case to 'template_basic'.
This is a part of the pending merge of the D module, where 'template' is a keyword (and thus not a valid module name).

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12295 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 00:15:41 +00:00
David Nadlinger
ee1c2f3ef0 Renamed 'immutable' test-case to 'immutable_values'.
This is a part of the pending merge of the D module, where 'immutable' is a keyword (and thus not a valid module name).

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12294 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 00:15:13 +00:00
Vadim Zeitlin
f6cab0170a Ignore non-matching regex renames when searching renames list.
Skip over %renames with non-matching %(regex)s expansion when looking for the
one to apply to the given name. This allows to have multiple anonymous renames
using regex as now the first _matching_ one will be used instead of always
using the first one and ignoring all the rest of them.

Extend unit tests to verify that applying two anonymous %renames does work as
expected.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12293 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-16 14:09:39 +00:00
William S Fulton
c9ede7e622 Fix unary scope operator (::) (global scope) regression introduced in 2.0.0. The mangled symbol names were incorrect, sometimes resulting in types being incorrectly treated as opaque types.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12264 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-13 05:48:59 +00:00
William S Fulton
61e9073e07 Add missing return value in testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12246 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-03 20:47:45 +00:00
William S Fulton
c7b4336a6c add missing return to testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12244 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-03 16:47:30 +00:00
William S Fulton
378ce60b49 Lua warning fix since previous commit changed max to maximum
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12242 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-03 15:08:03 +00:00
William S Fulton
70c9dc5dcc Fix warning running under Go
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12241 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-03 15:01:24 +00:00
William S Fulton
3219746776 Apply patch #3066958 from Mikael Johansson to fix default smart pointer handling when the smart pointer contains both a const and non-const operator->.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-03 13:12:00 +00:00
William S Fulton
5ff6553319 testcase warning suppression
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12232 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-28 17:37:33 +00:00
William S Fulton
31af118c41 Move Swig_locator from scanner.c to cscanner.c. Fix file and line error/warning reporting fixes where SWIG macros are used within {} braces (where the preprocessor expands macros), for example macros within %inline {...} and %fragment(...) {...} and nested structs. Basically anything that results ina call to skip_balanced() in the parser/preprocessor.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12227 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-24 22:13:13 +00:00
William S Fulton
b01277a19b Various inherited class warning/error line number fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12223 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-18 01:14:21 +00:00
Vadim Zeitlin
f89181d4c8 Fix the rename_pcre_encoder unit test for Python.
Due to a bug in the way %rename() directives without a name currently work,
the second %rename in rename_pcre_encoder.i overrides the first one and the
function wxDoSomething() is not renamed to DoSomething() any more. Remove the
test for this renaming that doesn't work to at least let the rest of the test
to pass.

Also test that SetXXX() functions from the .i file really are renamed to
putXXX() as expected.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12217 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-11 11:44:26 +00:00
William S Fulton
efb9090a87 Fix correct line number reporting in errors/warnings when a macro definition ends with '/' and it is not the end of a C comment - swig.swg has some of these macro definitions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12215 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-11 11:02:18 +00:00
William S Fulton
f82811dbcd Fix incorrect line number reporting in errors/warnings after parsing macro invocations with parameters given over more than one line.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12214 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-10 23:44:27 +00:00
William S Fulton
4435fe4f4a Update expected error/warning results since last commit
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12213 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-10 23:39:03 +00:00
William S Fulton
e3092a6150 Remove java specifics from testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12212 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-10 06:40:42 +00:00
William S Fulton
122bc852f9 Fix #2149523 - Incorrect line number reporting in errors after parsing macros. Remove extraneous extra line in preprocessed output which would sometimes lead to error/warning messages two lines after the end of the file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12211 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-10 06:08:45 +00:00
Olly Betts
f6cd7912e3 Revert change inadvertently included in previous commit.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12210 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-08 02:45:23 +00:00
Olly Betts
52819796ca Fix a couple of typos
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12209 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-08 02:43:32 +00:00
Olly Betts
a25ccbf58b [PHP] Fix handling of OUTPUT typemaps (Patch from Ryan in SF#3058394).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12208 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-08 02:40:56 +00:00
William S Fulton
b2e2cb8f66 Add test for line number reporting for multiple macro expansions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12205 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-06 18:25:22 +00:00
William S Fulton
46bd4a26c6 Add expected error/warning messages log
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12204 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-06 18:12:13 +00:00
William S Fulton
b0609c3be2 Add some more preprocessor tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12203 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-06 18:10:43 +00:00
William S Fulton
04c3e6b7d3 Fix line numbering for 'Unterminated call invoking macro' error
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12202 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-06 17:30:18 +00:00
William S Fulton
45601f24b4 Fix line numbers in error and warning messages for preprocessor messages within %inline. Also fixes __LINE__ within %inline
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12200 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-03 17:47:12 +00:00
William S Fulton
1e6ed0843f minor clarification in test comment
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12198 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-01 21:11:09 +00:00
William S Fulton
aa728ece67 Fix __LINE__ and __FILE__ expansion in macros with no arguments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12197 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-01 21:06:10 +00:00