Dimitar Dobrev
fac861ad8d
Make indexers use non-trivial copy ctors if any
...
Fixes #1229 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
3cd7fdee25
Generate valid C# for implicit conversion to const char*
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
f810ca63b2
Generate valid C# when passing a const ref to char
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
1fc1b4ec51
Fix default arguments to only map to null if pointers
...
This bug is revealed by properly fixing the reading of ABI parameters in the parser.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
458293edfc
Generate valid C# for returned const void pointers
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
43c17f9946
Generate valid C# for r-values to void pointers
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
53816286bc
Fixed type map support for typedef types.
...
Fixes https://github.com/mono/CppSharp/issues/1205 .
6 years ago
Dimitar Dobrev
0e56bc62e2
Generate valid C# for returned const char*&
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
d735f391b1
Fix the generated C# for fields of type function pointer
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
d5380fe890
Fix the generated C# for const char*&
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
e2a23b8987
Fixed the generated C# when returning a non-const char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
c688330897
Fixed the generated C# for parameters initialized with {}.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
12642f9a42
Fixed the generated C# when an unsigned enum is assigned a negative value.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
01b4fa4c2e
Fixed the warnings in the test C++ for C# only.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a4913509eb
Added type maps for primitive strings (pointers to char).
...
const char*, const char16_t* and const wchar_t* in particular.
This enables comparison of types when resolving ambiguity.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
7817b52ce3
Tested indirect calls from native code of overrides in the target language.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
3346be0084
Resolved ambiguity between char-like types in the generated C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
aef1acb43f
Fixed the generated C# for default arguments of type pointer to a function.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
a1af3d3182
Fixed the generated C# for a certain case of two default parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
dc27c44606
Fixed the generated C# for arguments with default values of "nullptr".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
637018f4d6
Fixed the generated C# for setters with default parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
1420bd9216
Fixed the generated C# for public fields with types mapped to primitive.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
0c87a77311
Fixed the generated C# for constant references to primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8feac37ae1
Fixed ambiguity when the type of a parameter is mapped to a type in an overload.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
92da301135
Fixed the generation when a secondary base is used in more than one unit.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
2d57c787c6
Fixed generation support for pointers to enums in C#.
...
Fixes https://github.com/mono/CppSharp/issues/1093 .
7 years ago
Dimitar Dobrev
8d0db5d341
Reverted a simplification because it caused a regression.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
efbe7cd3e4
Fixed the generated C# for a fixed array of pointers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
122359bf9e
Fixed the generated C# when a virtual function takes a fixed array.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
3af63fb33d
Fixed the generated C# for fixed arrays in types of parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
2b364d9787
Grouped all tests for arrays together.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f6033f3a5a
Fixed the generated C# for virtuals taking arrays of objects.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a319f96261
Fixed the generated C# when a virtual function takes an array.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
6a15e51d76
Added C# marshalling of parameters of type array of const char* const.
...
Fixes https://github.com/mono/CppSharp/issues/692 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
37b3339e71
Added C# marshalling of parameters of type array of const char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
140a624f43
Added C# marshalling of parameters of type array of objects.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
ce71a3b8a8
Added C# marshalling of parameters of type array of primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
3d9cc3ab70
Added marshalling of parameters of type array of pointers.
...
Fixes https://github.com/mono/CppSharp/issues/932 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
8a2e813445
Merged Delegate Pass and pass for Anonymous Delegates and added the following improvements alongwith.
...
1. Got rid of Anonymous Names.
2. Merged the common code for Delegate Generation.
3. The delegate pass also works for C++/CLI now.
4. Fixed the calling conventions of delegates for both, C++/CLI and C#.
5. Ensures that if a delegate is used for a virtual as well as something else, it finally ends up as public.
6. Fixed the code generation when the return type of a method is a function pointer that has been used somewhere else as well.
7. Added Access and Calling convention to the delegate definition.
The only thing left is to get rid of the hack used, i.e move the code in VisitFunctionDecl to VisitParametersDecl. Somehow, it's not working right now.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f33b162f6f
Ignored inlined name-spaces in the C# gen only.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
e0816d9dc6
Fixed the generated C# for increment and decrement operators.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cd548059e9
Added support for class templates which do not specialise types external to them.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
46b40bbe05
Fixed the generated C# for a case of a typedef of a function pointer.
...
Typedefs of function pointers can be written in two ways:
typedef void (*typedefedFuncPtr)();
int f(typedefedFuncPtr fptr);
typedef void (typedefedFuncPtr)();
int f(typedefedFuncPtr* fptr);
Up until now we only supported the former.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
db522c0295
Fixed the C# generation for functions with typedefed function pointers as params ( #903 )
8 years ago
Dimitar Dobrev
91bcc7c8a2
Fixed the generated C# when std::string is only used as a parameter.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
realvictorprm
10c86a2a10
Fixed the generated C# when an incomplete class is forwarded more than once.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
realvictorprm
938ccf686b
Incomplete classes and structs are now generated for C#. ( #797 )
...
This feature is NOT coming for C++/CLI !
8 years ago
Dimitar Dobrev
e2a2e8df4b
Fixed the generated C# for an array of const char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
8b230bdf07
Fixed a corner case of a default parameter with a type mapped to an enum.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
2352681f5b
Fixed a regression causing objects to be missing at virtual calls.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago