Commit graph

8 commits

Author SHA1 Message Date
William S Fulton
592b97a8cd Improve backwards compatibility in D std::vector wrappers
For users who have typemaps for the parameters in the setElement method.
Correct definitions of const_reference to match the those in the
(C++11) standard.
2019-04-19 00:22:53 +01:00
William S Fulton
6d27ead9c0 Add STL container copy constructors where missing
Also provide consistent copy constructor declarations.
2019-02-14 18:53:05 +00:00
William S Fulton
e26f6bb4e2 Add missing typedefs to std::vector + typedef corrections
Tests for std::vector of pointers added which check
 std::vector<T*>::const_reference and std::vector<T*>::reference
usage which gave compilation errors in Python and Perl which had
specialized these vectors incorrectly.
2019-02-13 22:46:28 +00:00
William S Fulton
fdca8e9829 Better variable naming consistency in STL containers 2017-05-26 22:37:29 +01:00
William S Fulton
449aa08124 %extend changes and remove default use of javatype, dtype, cstype %typemaps
1) The %extend directive can now optionally support one of the 'class', 'struct' or 'union'.
2) The SWIG library no longer uses the javatype, dtype or cstype typemaps, thereby
   completely freeing them up for users to use without having to replicate the library
   code that they previously added

Tested by changes to test: java_lib_arrays
2017-01-15 16:50:24 +00:00
Marvin Greenberg
843aa7cd65 Work around differences in clang libc++ std::vector<bool>::const_reference
clang++ using -stdlib=libc++ defines const_reference as a class,
to map boolean vectors onto a bit set.  Because swig does
not "see" the type as "const &" it generates incorrect code for this case,
generating a declaration like:

  const_reference result;

When const_reference is a typedef to 'bool' as is the case with stdlibc++
this works.  When this is actually a constant reference, this is clearly
invalid since it is not initialized.  For libc++, this is a class
which cannot be default constructed, resulting in an error.  The fix
is to explicitly define the various accessor extensions as having a
bool return type for this specialization.
2014-02-04 16:00:12 -05: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
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