Commit graph

35 commits

Author SHA1 Message Date
William S Fulton
dafe2d6949 Add director typemaps for pointer const ref types 2017-10-24 23:47:40 +01:00
William S Fulton
280090ed4b Add director shared_ptr typemaps for D 2017-10-17 22:47:16 +01:00
William S Fulton
ed4b84f4d3 Fix overloading of shared_ptr method overloading
Add 'equivalent' attribute to typecheck typemap.
Closes #1098.
2017-09-23 15:19:34 +01:00
William S Fulton
f5e1856650 Expand std::shared_ptr testing to C# D Java Python 2017-09-22 20:03:47 +01:00
William S Fulton
19fa79830d Run some preprocessor constants tests that were previously disabled.
These probably should have been enabled with 256e283fc3
2017-09-18 07:10:49 +01:00
William S Fulton
9e2a12416c Fix type promotion wrapping some non-trivial constant expressions
This was previously an integral type instead of a floating point type:
2017-09-18 07:06:27 +01:00
William S Fulton
90ba174fce Fix generated code for constant expressions containing wchar_t L literals.
Such as:
  # define __WCHAR_MAX    (0x7fffffff + L'\0')

Reported on swig-user mailing list.
2017-09-17 19:02:55 +01:00
William S Fulton
3d2e57b0f2 Add %proxycode directive for adding code into proxy classes for C#, D and Java 2017-01-13 20:43:50 +00:00
William S Fulton
3718b810c7 Don't generate constructor wrappers if a base class has a private constructor
g++-5 errors out with this now with errors such as:

default_constructor_wrap.cxx:665:27: error: use of deleted function ‘FFF::FFF()’
   result = (FFF *)new FFF();
                           ^
default_constructor_wrap.cxx:314:7: note: ‘FFF::FFF()’ is implicitly deleted because the default definition would be ill-formed:
 class FFF : public F {
       ^
default_constructor_wrap.cxx:301:4: error: ‘F::~F()’ is private
    ~F() { }
    ^
default_constructor_wrap.cxx:314:7: error: within this context
2015-07-07 20:15:55 +01:00
David Nadlinger
7c57ebf888 D: Use configure-detected default language version for test-suite. 2014-11-06 23:04:36 +01:00
David Nadlinger
5d133ada91 D: Use deterministic allocation on the D side in li_boost_shared_ptr_runme.i. 2014-11-06 23:04:35 +01:00
David Nadlinger
bb768f5aa5 D: Fix li_boost_shared_ptr_runme.2.d compilation.
The overload of Thread.sleep taking a bare integer has been
deprecated/removed.
2014-11-06 23:04:34 +01:00
William S Fulton
d03c260738 D test-suite fixes
Fixes 'make partialcheck-d-test-suite' and probably normal D
test-suite usage (unable to test)
2014-10-25 15:46:43 +01:00
William S Fulton
beccd3258f Update all languages to use SCRIPTDIR
R also to use SCRIPTPREFIX and SCRIPTSUFFIX
2014-05-15 23:11:07 +01:00
William S Fulton
2b5499a262 Slight simplification of test-suite build for new out-of-source changes
Provide default SRCDIR and SCRIPTDIR variables in common.mk and override
only where needed.
2014-05-15 23:11:07 +01:00
Karl Wette
f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Olly Betts
618868ce3d Fix typos 2014-04-29 11:31:29 +12:00
William S Fulton
4f3c77051f Slight wording change when running test-suite
Should be easier to parse 'by eye'
2014-02-22 20:51:27 +00:00
William S Fulton
439a353a36 Document patch #33 from previous commit and complete run time tests 2013-04-18 23:20:48 +01:00
David Nadlinger
17a7ba0403 [D] Exception and Error have become blessed names; removed d_exception_name test case.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12900 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-23 21:59:20 +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
David Nadlinger
e2b2f26bf6 [D] Use stdc.config.c_long/c_ulong to represent C long types.
Previously, C's long/ulong types would always be mapped to 32 bit integers in D, which is wrong on D_LP64, but was not really a problem in practice since DMD used to be 32 bit only.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12861 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-03 19:48:01 +00:00
David Nadlinger
5e5d1e2775 [D] Test case fix: IntVector holds ints, not size_t.
Also changed for() to foreach() for better style.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12860 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-03 19:47:39 +00:00
David Nadlinger
3d82a7a185 [D] Test case fix: Aliases now required for non-overridden base class overloads.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12859 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-03 19:47:26 +00:00
David Nadlinger
388484bb77 [D] Improved allprotected test case error messages.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12858 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-03 19:47:12 +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
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
ff965c1aff [D] std.algorithm.indexOf() was deprecated, use countUntil() instead.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12531 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:30:21 +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
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
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
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
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
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