Commit graph

10 commits

Author SHA1 Message Date
William S Fulton
e43dfc69e5 Precision loss warning fixes for C# std::complex<float> typemaps
For gcc -Wfloat-conversion and vc++ C4244 warnings
2017-10-10 19:26:54 +01:00
William S Fulton
a55981b883 Fix C# std::complex pass by value typemaps 2017-10-02 19:07:24 +01:00
William S Fulton
fb941315c1 Add header to std_complex.i 2017-05-19 20:25:15 +01:00
William S Fulton
57ec5ec056 Fix linkage problems in C# std::complex wrappers
Fix warnings and subsequent exception trying to use wrappers:
Warning C4190: 'CSharp_complextestNamespace_VectorStdCplx_getitemcopy'
has C-linkage specified, but returns UDT 'SwigSystemNumericsComplex'
which is incompatible with C

Rename swig_complex_typemaps macro to SWIG_COMPLEX_TYPEMAPS
2017-05-19 19:52:39 +01:00
William S Fulton
e11e1c4cb8 C# std::complex wrappers marshalling by value
Change the wrapping to marshall directly to the .net
System.Numerics.Complex type instead of using an intermediate
std::complex .net type.
2017-05-19 08:15:01 +01:00
William S Fulton
8c13ee2411 C# std::complex wrappers SwigValueWrapper fix
Fix std::complex constructor declaration to stop SwigValueWrapper from
being generated
2017-05-19 07:10:43 +01:00
William S Fulton
bb758d7810 Use %naturalvar for C# std::complex wrappers 2017-05-19 06:58:54 +01:00
Vadim Zeitlin
03f229b314 Allow avoiding generation of unwanted std::complex<T> typemaps
In many cases, only one of std::complex<double> and std::complex<float> is
used, so while we continue to define typemaps for both by default, for
compatibility with the other modules, add a possibility to avoid generating
the code for the unwanted specialization by predefining the corresponding
SWIG_NO_STD_COMPLEX_$TYPE before including this file.
2017-04-15 20:28:30 +02:00
Vadim Zeitlin
95aa3d9389 Also apply csvar{in,out} typemaps to std::complex references
This is needed to handle the artificial complex-valued properties created
using %naturalvar correctly.
2017-04-15 20:18:24 +02:00
Vadim Zeitlin
485efd511f Add std_complex.i for C# too
For consistency with the other modules (Python, Ruby and JS), allow including
<std_complex.i> directly when using C# too instead of including <complex.i>
which only works in C++ mode (i.e. when using std::complex) anyhow with C# for
now.
2017-04-14 19:23:31 +02:00