triton
21efb8fc83
Fixed a bug by removing this weird looking code from the C# marshaller.
...
The test suite still passes too.
11 years ago
triton
08255907de
Fixed C# and CLI backends to check for null values when marshaling classes.
11 years ago
Øystein Krog
d3e963ff19
Move helper methods in Type out from class and into extension class TypeExtensions
11 years ago
Dimitar Dobrev
99849da1d1
Added preliminary support for char16 to avoid crashes because of null parameter types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
85e56de487
Applied Helpers.SafeIdentifier in the name-cleaning pass in order to get correct names in type maps.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
d92bc31a71
Replaced a call to == with ReferenceEquals when checking for null to avoid cycles in == operators.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
fe6378a88a
Added an additional property to type maps indicating if they actually provide marshalling (useful if only copy constructors are replaced).
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
cfeed2619a
Extended type maps with the ability to insert custom code instead of a copy ctor invocation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
4c5d933cd2
Added support for marshalling arrays of pointers to primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
aa5b66a4ab
Wrapped fields of structures with properties.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
227e592c1a
Improved the marshalling of arrays.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
62f81e16f1
Reworked pointer marshaling in C# and CLI.
...
We are now more consistent between backends, specifically we need to make sure
to avoid directly visiting the desugared type since we might lose type maps when
handling typedefs.
12 years ago
triton
c8b0f515b3
Fixed parsing and marshaling of dependent declarations.
12 years ago
Dimitar Dobrev
8a502835f7
Added a check for 'null' before getting the native pointer of a wrapped object.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
acbdf7d82a
Added a test for fixed arrays which showed that setting actually worked incorrectly.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
275b4a1696
Filled in the setting of a fixed array.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
80dca38041
Filled in the returning of a fixed array.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
07beb47048
Converted return types to their complementary interfaces, if any.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
1962751cb8
Stored the original class in its interface replacement used with multiple inheritance.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
3a9eef1e80
Added a new pass converting all parameter types to their respective interfaces, if any.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
5d308dc7c3
Fixed the generation of calls to members of nested classes.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
6edc1ac19b
Marshalled pointers to primitive types as such instead of using IntPtr.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
b82aebab3a
Added support for writing using indexers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
66ef3c55ff
Reworked support for out parameters in both backends and added a test.
12 years ago
Dimitar Dobrev
f38fa134e4
Added an option for an encoding.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
de4879f108
Added support for Unicode when marshalling strings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
19cb1f5470
Added an off by default option for generating abstract implementations because the MS ABI branch does not always work.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
da6887ff07
Fixed the allocation of internal abstract implementations, and fixed their constructors to take a pointer to the abstract type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
6d2c0eaed8
Generated internal implementations of abstract classes in a new pass.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
0f5e27f939
Fixed a bug that caused the generation of the uncompilable expression "&*IntPtr".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
0ae181b2cf
Added suffixes to generated variables to avoid conflicts.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
bc14348d5f
Generated compilable wrappers for functions taking char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
d659f04d9d
Generated compilable wrappers for functions taking char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
5208fafef7
Moved GeneratedIdentifier to the base Generator so that the former is available to all back-ends.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
fe1387331d
Removed a hard-coded "__".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
f163ceac63
Replaced an expression with a variable so that the & operator works.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
fb481baf7d
Fixed return of structures by value in C# backend similarly to the CLI backend by using copy constructors if the class has any non-trivial ones, or just copying memory directly if the class only has trivial ones.
12 years ago
Dimitar Dobrev
79f7fb7b11
Generate qualified type names in property setters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
db1c413f87
Ensure safe property and variable names.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
e650d7decf
Desugar pointer types when checking for primitive types while marshaling.
12 years ago
triton
cc5a8656b8
Added marshaling of parameter declarations in native to managed marshaling of C# backend.
12 years ago
triton
5c34245276
Throw NotImplementedException instead of silently returning false when not able to handle type printing of primitive types in C# backend.
12 years ago
triton
eb909c6fba
Added an "argument prefix" generator to the C# context so typemaps can add prefixes before arguments are generated.
12 years ago
triton
e5ba3ac401
Reworked C# type printing and marshaling to keep the root full type in the respective contexts.
...
This allows us to access the root type in the type maps to do proper handling of pointers. It's a bit of an hacky approach and it will be improved once there is a better more general type matching framework.
12 years ago
Dimitar Dobrev
ef1828d710
Checked the desugared type when visiting pointer types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Bright Twin
7c19f5f7db
Added global:: prefix to all System.IntPtr references in the C# code generator.
...
Without this qualification it is possible for the generated code to have namespace clashes with nested System namespaces in the code being wrapped.
12 years ago
triton
68ddfbdd6f
Move the AST project to the CppSharp.AST namespace.
12 years ago
triton
6b5f218258
Use the previously declared local variable.
12 years ago
triton
2301f4c7a9
Improved support for arrays in the marshaler.
12 years ago
triton
6759ec6754
Added better support for out parameters in the marshaler.
12 years ago