Dimitar Dobrev
3ee6165053
Fixed the generated C# when a virtual function returns a primitive pointer.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
1932798d45
Aligned pointers to classes when passing them converted to their secondary bases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
34c75d28f6
Avoided ambiguous local variables when marshalling arrays.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
be32825bed
Added support for wrapping variable arrays.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
b2a90a5d80
Prefixed the internal structure for the C# end to avoid naming conflicts.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Joao Matos
4e48af9a4c
Remove the Driver dependency from the generators with a BindingContext.
9 years ago
Joao Matos
a44da437e6
Rename AstVisitor.Options to VisitOptions.
9 years ago
Dimitar Dobrev
e2690ba078
Switched the C# generator from manual conversion between strings and pointers to the built-in string marshallers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
5b52075d32
Fixed the generated usages of internals of template specialisations with dependent fields.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
4df66454b1
Enabled cleaning up in type maps and used it to dispose of used std::string objects.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
c1be105d46
Added marshalling of fixed char arrays.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Joao Matos
2ed0565d18
Optimized ArgumentNullException exception message.
...
Should lead to less code size bloat due to unnecessarily unique strings.
9 years ago
Joao Matos
f8bd69790e
Fixed marshaling of typedef'd const char strings.
9 years ago
Abhinav Tripathi
e9152a79b5
Fixed missing namespace problem.
10 years ago
Dimitar Dobrev
d328b7ce34
Properly handled nulls passed to C++ refs by throwing an exception.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
e36d6f0aae
Improved the handling of char arrays by using desugaring.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
a18479e1db
Generated valid code for wrapping char arrays.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
fbb2f941c4
Based on Abhinav Tripathi's work: extracted delegates in order to reuse them.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
54e8a16fd1
Reverted the representation of Booleans as managed Booleans except in internal structs.
...
Managed booleans are more CPU-efficient than bytes, and some problems with code generation are fixed.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
912248b5da
Skipped patching of v-tables for objects not put in the native-managed map.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
f848f62180
Some refactoring to remove redundant members and casts.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
80643e0457
Added support for parameters with type a reference to a fixed-size array.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
007fb4b57c
Removed parameters wrapped in v-table delegate hooks from the native to managed map.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
c28b8db3e5
Removed the TODO-s about marshalling char and bool because those are not bugs.
...
See https://msdn.microsoft.com/en-us/library/ef4c3t39.aspx and https://msdn.microsoft.com/en-us/library/75dwhxf7.aspx .
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
91b3a5aef1
Worked around an MS .NET bug which prevents marshalling bools in certain cases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
170e0a5934
Removed char from internal fields because marshalling is broken.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
triton
5e3706c879
Fixed marshaling of regular UTF16 strings.
10 years ago
triton
144d26749f
Fixed wide string marshaling on UTF-32 platforms.
10 years ago
Abhinav Tripathi
c6ae35ff7d
Added marshalling of fixed size ref type arrays.
10 years ago
Dimitar Dobrev
a2b8614f54
Improved the support for constructor expressions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
78c3db80aa
Fixed incompilable code when a virtual function has ref params.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Pedro Miguel Casaleiro Dias
ed3e0bd54a
closes #514 .
...
test added to tests/CSharpTemp/CSharpTemp.Tests.cs
10 years ago
Dimitar Dobrev
86bd6bd118
Fixed the names when marshalling enum parameters in the C# end.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
de0392ca1e
Fixed a bug when a function returns an abstract class contained in a dependency.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
77369b50c5
Removed the option for abstract impls enabling them by default for the C# generator.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
João Matos
6917008a4b
Use the qualified class name when handling returned class pointers.
10 years ago
triton
ea4ce03e92
Use the qualified class name when casting the object from the native/managed map.
10 years ago
triton
14e53b523f
Cast when creating new object instances since CreateInstance returns the base type.
10 years ago
Dimitar Dobrev
73e9455821
Put own (created in managed code) objects in the object map upon creation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
84d8af2396
Added a mapping between native object and their managed wrappers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
João Matos
a7443265a0
Fixed marshalling of `const char**` types in C#.
...
Fixes issue #454 .
10 years ago
Dimitar Dobrev
c7253b456b
Fixed the assigment of structs with private fields.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
Dimitar Dobrev
e6223a1c4c
Fixed 4 bugs related to custom comparison operators.
...
1. Missing Equals to complement operator ==;
2. Endless recursion when having a == and comparing to null;
3. Crash when having a == and comparing a null pointer to sth else;
4. Incompilable code with a type derived from a struct with operators.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
Dimitar Dobrev
bc140e13be
Changed the native ctors by value to also be wrapped by static methods.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
triton
6bd26ac443
Improved wide char handling in the C# and CLI.
...
References #320 .
11 years ago
Dimitar Dobrev
c4b48cf185
Fixed some problems with arrays of void after mapping void* to IntPtr.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
Dimitar Dobrev
30cb2cbe85
Fixed an ambiguity between an internal ctor and a potential wrapped one.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
Dimitar Dobrev
0e8a6e368c
Moved the code for creating a ref object by value from the marshalling printer to a valid ctor by value.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
Dimitar Dobrev
dddd165001
Fixed the generation of a null check before returning a value.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
Dimitar Dobrev
a7d0ef13f9
Removed a needless renaming of parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago