Commit graph

34 commits

Author SHA1 Message Date
William S Fulton
d918bddfc0 Fix segfaults when using filename paths greater than 1024 characters in length - use String * and heap instead of fixed size static char array buffers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:45:18 +00:00
William S Fulton
684bd8e472 Minor warning fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:48:09 +00:00
William S Fulton
fd24b188e2 Fix Coverity 'Uninitialized pointer fields' - member variables are now initialized
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:17:28 +00:00
William S Fulton
46d2486115 Resource leak fixes (or hiding them from Coverity static analysis tool by using String instead of char *)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13886 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:54 +00:00
William S Fulton
5a1e82a2f4 Remove DohClose (Close) and replace with calls to DohDelete (Delete) to fix some minor memory leaks in most uses of NewFile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13885 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:07 +00:00
William S Fulton
f6229d4b73 Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously the name was ignored during the typemap search. Implemented by ensuring the 'type' attribute in the Node is set up correctly and using the usual Swig_typemap_lookup on the Node.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-27 17:37:34 +00:00
William S Fulton
cad26e49fe Fix use of deleted memory in D module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13556 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-08 06:06:31 +00:00
William S Fulton
8bf1347354 Warning fixes using clang
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13024 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-29 21:51:18 +00:00
David Nadlinger
8fa4d20ec3 [D] Correctly annotate function pointers with C linkage.
Minor cleanups as well.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12899 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-23 21:59:00 +00:00
William S Fulton
de5a78c781 Expand symname special variable in director typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-23 16:27:15 +00:00
William S Fulton
468ca084fc Correct special variables in 'directorargout' typemap. This change will break any 'directorargout' typemaps you may have written. Please change: to and to \n Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't previously compile and add in , etc expansion.\n [C#, Go, Java, D] Add support for the 'directorargout' typemap.\n [Java] Add (char *STRING, size_t LENGTH) director typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-20 20:50:36 +00:00
William S Fulton
24133bacd7 Remove numerous hard coded 'result' variable name in generated c/c++ wrappers. The variable name is now defined in just one place, making it possible to change the name easily if a target language so wishes - see cwrap.c.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-30 21:51:50 +00:00
William S Fulton
8b9afd0772 Fix %callback which was generating uncompileable code for C# and D
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12785 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-26 18:05:50 +00:00
David Nadlinger
1dcc81fced [D] nspace: Correctly generate identifiers for base classes when
not in split proxy mode.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12641 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-23 13:34:08 +00:00
David Nadlinger
f9def91f30 [D] Ported r12557 (char enum values).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12630 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 16:10:42 +00:00
David Nadlinger
6c0f3f1a7d [D] Fixed referencing types in the root namespace when not in split proxy mode.
Previously, invalid code would be generated for cases like the following if the nspace feature was active, but the split proxy mode not:
---
struct Foo {};
namespace Ns {
  struct Bar {
    void bar(const Foo &f) {}
  };
}
---

Thanks to Johannes Pfau for reporting this.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12629 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 14:02:52 +00:00
David Nadlinger
3af2e27a3f [D] Fixed qualified name handling, broken since r12588.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12628 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 14:02:29 +00:00
David Nadlinger
7709e0303a [D] Added -d2 switch to usage information.
Previously, it was documented in the manual, but not present in the command line usage text.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12545 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-16 17:20:45 +00:00
David Nadlinger
ac375e90a8 [D] Whitespace cleanup.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12544 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-16 17:20:21 +00:00
William S Fulton
a63d456f8a Remove redundant code highlighted by warnings in gcc-4.6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 07:22:08 +00:00
David Nadlinger
ce6516fb4c [D] nspace support.
As for C# and Java, this doesn't work for free functions/variables yet.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12534 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:32:26 +00:00
David Nadlinger
a63cde3827 [D] Removed "-noproxy" switch from usage text.
I forgot to remove it from the list when I stripped the (undocumented and untested) code paths for it, which was even before the merge to trunk.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12533 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:31:13 +00:00
David Nadlinger
fb538c1b5b [D] Avoid implicit cast warning when building for x86_64.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12532 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:30:51 +00:00
William S Fulton
b69b793d8e Better consistency in usage display
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-09 21:42:38 +00:00
David Nadlinger
85ed05c241 [D] Tiny typo fix.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12405 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-29 21:31:40 +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
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
William S Fulton
5558d0092a Remove bad usage of a String rather than SwigType for D directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12330 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-07 21:15:05 +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
e0c82f6f2b portability fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12308 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-25 20:35:10 +00:00
David Nadlinger
e362f85431 [D] Use __cdecl instead of __stdcall on Windows as well to avoid special casing.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12303 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-22 00:33:26 +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