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
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
ce3d5d572a
Generate valid C# when a function is named "get<number>"
...
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
Dimitar Dobrev
9cad9462e2
Fixed ambiguous code when a nested type and a property-like method with overloads have the same name
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
aad3b7f186
Fixed the renaming of properties with the same name as their owners.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
bc7f20a10a
Fixed the generated C# when an instance method has a parameter named "instance".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
b966bd6798
Fixed the generated C# for const/non-const overloads with > 1 param.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
980f36735c
Fixed the generated C# when a ref parameter is named after a keyword.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
5df67cd0c7
Fixed the generation for parameters of type void**.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
6602841a3c
Fixed the generated C# for const void*& in parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
b0db304523
Fixed overloading of operators with parameters mapped to the same type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a65f91949c
Handled int and long in maps to help resolve ambiguity.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
4adc3d646a
Fixed right-value references creating ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
202ae75df4
Fixed the generated code in a case of ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a240827d54
Added a test for passing an std::string by value.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Matthew Albrecht
f8ccbb80c0
Added parameter index to managed marshal variables
7 years ago
Rokas Kupstys
d8b53721ef
Fix for #1043 ( #1044 )
...
Field property getter returns non-value types by reference instead of by copy.
Fixes #1043
* Minor code clarity cleanup in GenerateFieldSetter. No behavior changed.
* Fix incorrect code generated in some cases.
* Test for fields getters returning references.
7 years ago
Dimitar Dobrev
67b241d95b
Added support for 16-bit wide characters (char16_t).
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
046c428852
Fixed the binding of multiple identical function pointers with a calling convention.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
973fdafdfe
Generated properties from setters returning Booleans.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a056659d09
Generated properties from <type> get()/void get(<type>) pairs.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f9a8798b8f
Fixed the generated C# for setters with a reference to a primitive type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
49104ee0bf
Added a test for getting bases of ignored overrides in secondary bases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cece243a06
Equalised the access of overrides and their base methods.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
49e94460a5
Fixes Stack mismatch when bool param passed from C++ to C#
...
Fixes #834
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
9f4d501d0b
Fixed a regression of overridden setters not turning into properties.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
65d5037a72
Fixed the generation of C# for Virtual function with std::string params ( #878 )
...
Fixes #877
8 years ago
ktopouzi
75b96143d2
Used packing when laying marshalling structures out sequentially.
...
Fixes https://github.com/mono/CppSharp/issues/772 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
422b98a0fd
Enabled the tests for std::string.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
37adb3efc9
Fixed the binding of indexer overloads when there's more than one class key.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
c740a34dfa
Fixed the binding of a copy ctor when a move ctor exists too.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f549b63711
Removed the useless and problematic mapping of typedef-ed classes to empty ones.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Abhinav Tripathi
91fcfd0b5c
Fix CheckStaticClass pass and add test. ( #795 )
8 years ago
realvictorprm
4307fb3303
Fixed ArgumentException due to nullptr arguments in Marshaling native function pointers. ( #794 )
8 years ago
Dimitar Dobrev
358c03e261
Fixed a regression when a method called "dispose" is wrapped.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
dd82358a04
Always upper-cased the first character of a function.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
5f0840d117
Fixed the mapping of std::string not to destroy values when a reference (&) is returned.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
1aa85ab9f7
Fixed a bug causing some functions with pointer parameters to be marked as ambiguous when they aren't.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
e6c4bb9cc5
Fixed a crash when overrides change the sugaring of involved types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
deea8d8cda
Removed functions made ambiguous by different qualifiers on the same type in their parameter.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Joao Matos
7f75246215
Added support for C++11 type alias template declarations.
...
Partial fix for https://github.com/mono/CppSharp/issues/664 .
9 years ago
Joao Matos
afa12be715
Added support for C++11 type-alias type declarations.
...
In the future, we might want to add a TypeAliasDecl AST node,
but for now this simple approach is enough for typedef-like using declarations.
Won't be enough to support partial template using syntax (TypeAliasTemplateDecl).
Partial fix for https://github.com/mono/CppSharp/issues/664 .
9 years ago
Dimitar Dobrev
0a7b396842
Fixed the generated code when the C++ parameters are named "arg1", "arg2", etc.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
2624c91e75
Fixed the comparison involving typedefs to use their real types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
0e344b4b8a
Tested generation of C# comments at run-time.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
1d3e821093
Fixed #453 - incorrect comment generation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
38f1707474
Fixed #638 - incompilable generated C# code when a function takes a protected enum.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Joao Matos
f8bd69790e
Fixed marshaling of typedef'd const char strings.
9 years ago
Dimitar Dobrev
9ab71aeac7
Fixed the parsing of subclasses of dynamic template instantiations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago