Dimitar Dobrev
d31cab7315
Avoid invalid template specializations in tests
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Joao Matos
f5638bd3cc
Fix warning about #pragma once in source file.
6 years ago
Joao Matos
c5bcb48cc2
Implement UnresolvedUsingType and UnresolvedUsingTypename.
...
Fixes https://github.com/mono/CppSharp/issues/1235 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
4a4c919fb3
Extend printing and reading of exception types
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
be54a8b695
Make destructors virtual in abstract classes for tests
...
This fixes annoying warnings when compiling the generated code for additional symbols.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
b15ca8827e
Avoid generating abstract implementations for template classes.
...
Fixes https://github.com/mono/CppSharp/issues/1268 .
6 years ago
Joao Matos
3409498738
Fix template type checking in CovariantTypeComparer.
...
Fixes https://github.com/mono/CppSharp/issues/1266 .
6 years ago
Ghasan Al-Sakkaf
0b9b10d2f5
Fix enum with zeros for hex literals
6 years ago
Dimitar Dobrev
05c70ea515
Generate valid C# when an external module has an unsupported operator
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
c62f85bfa8
Delete a custom pass added as standard
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
e592a2b611
Fix properties when a setter precedes a getter
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
ed6f8f1f96
Fix comparison of char and const char* in overloading
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
0e0513feaa
Fix regressed overloaded potential setters
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
51978ad4c4
Restore writeable properties starting with verbs
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
e11057d71d
Fix regressed virtual read-only properties with setters in subclasses
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
9d365a6b9a
Restore mapping of two properties of the same name save for a prefix
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
d2ebabbebe
Restore mapping of overloaded getters to methods
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
914b977dfd
Optimize the pass for properties
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
b12acfcce7
Upgrade ANSI marshalling to UTF-8 marshalling
...
UTF-8 is backwards-compatible with i.e. a strict superset of, ANSI, so we can safely marshal any ANSI as UTF-8 and thus we gain UTF-8 support for free.
Also fixed leaking memory when passing strings to native code as nobody ever freed the previously used Marshal.StringToPtr.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
573272e855
Generate valid C# when a renamed override causes conflicts
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
d9a33bac7b
Ensure protected nested types are accessible with multiple inheritance
...
Fixes #594 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
1792f529ff
Fix the getting of references to pointers in C#
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
62fc6f90d9
Fix the passing of references to pointers in C#
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
c0510730f0
Prefer non-mapped types when resolving ambiguous overloads
...
This fixes a missing specialized method when it has a parameter with type a mapped template which is ignored when dependent.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
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
547a9f2819
Fix the passing of std::string by value
...
std::string has a non-trivial copy constructor which was erroneously ignored.
Fixes #867 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
153a4d095b
Guard against null for objects passed by value
...
Fixes #1228
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
caed19e863
Generate valid C# when a secondary base has a public anonymous field
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
991c6ffb25
Generate valid C# for typedef-ed type parameters
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
6b744458b4
Flatten anonymous types to avoid empty names
...
This improves our generated API as we no longer need "_0"-like names and also prevents conflicts between an anonymous type and a property of this type.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
64773a5f6f
Generate valid C# for template parameters with a default value
...
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
Dimitar Dobrev
fce2841a21
Generate valid C# when a field with an anon type starts with '$'
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
ce3d5d572a
Generate valid C# when a function is named "get<number>"
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
14e0ff958b
Fix the Windows build by not storing Unicode in std::string
...
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
0e8c80c3b2
Name anonymous types after the fields which use them
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
9959941f29
Fix the Unix CI by adding an explicit destructor
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
6e7a23883a
Generate valid C# when std::string is only used for variables
...
Fixes https://github.com/mono/CppSharp/issues/1209 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
1d2880751a
Generate valid C# when std::string is only used for non-private fields
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
39d5828b64
Fix a regression with headers named after keywords
...
Fixes https://github.com/mono/CppSharp/issues/1212 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a9bfe1c31f
Support indirect parameters
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
76ef6b046e
Add a test for passing by value of structs with copy ctors.
6 years ago
AlexR
82e41d3601
Fix a crash when a function pointer takes a function pointer
...
Fixes https://github.com/mono/CppSharp/issues/1144
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
380d064ca0
Generate valid C# for overloads with types nested in templates
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago