Dimitar Dobrev
0d5c4539a2
Generated internals of types nested in templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
5f679576e0
Fixed the generated code when a template has a base type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
2403d7d3a3
Replaced the useless internals of templates with the internals of their specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
2294fe56fb
Fixed the layouts of ignored dynamic types by generating their v-table pointers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
336dbe8ff8
Marshalled fields with a pointer type as IntPtr.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
6fd6649bb5
P/Invoked OS X frameworks instead of just libs when applicable.
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
3dc915961c
Optimized GetPropertyName for the common case.
9 years ago
Joao Matos
62d5f00c77
Fixed code generation of subscript operator for types with non-default parameter usage.
9 years ago
Joao Matos
3c70bce12e
Fixed generation of global functions with C# keyword name.
9 years ago
Dimitar Dobrev
6cb764700a
Replaced the Internal* in native ctors with void* because of templates with dependent fields.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Abhinav Tripathi
347d0cdbaf
Fix for fn call when def argument is interface.
10 years ago
Dimitar Dobrev
3402952388
Called the most derived destructor when it's not virtual.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
54cb17f313
Removed the exception when disposing of objects not originating from managed code.
...
This way we can destroy C++ objects the user is responsible for.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
36c55fc656
Applied SuppressUnmanagedCodeSecurity to P/Invokes with WinApi calling conventions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
640f957e69
Removed the hard-coded (always public) visibility of generated enums.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
057e025ee3
Fixed a memory leak by removing from static members typedefs used for delegates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
5ca49e3c3e
Moved the prepending of the comment prefix to the comments themselves.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
f7b4d6ce83
Fixed the wrapping of operators for non-equality to handle null.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
477dd914cb
Fixed setters of indexers when the key is type-mapped.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
1c52e67bb8
Fixed the wrapping of indexers returning value types.
...
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
5dde771d77
Removed a redundant field in the generated code.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
c2a569e24d
Only patched the v-table entries for non-dtors in user-derived classes.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
2885200732
Changed the native ctor to only patch the v-table entry of the virtual dtor, if any.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
8ebefa1f37
Added support for call expressions in default args.
...
The conversion of an expression to a string has been moved to the generator because a function may have been renamed or converted to a property.
However, since that string is language-specific, it should be created in the generator anyway. Therefore we should (over time):
1. Move any string manipulation from the pass for default args to the printer for expressions which is in turn used only by the generator;
2. Remove the Statement.String property (when 1. is entirely complete).
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
8a68d2d16c
Fixed the generation of overrides of virtuals from secondary bases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
53074cca58
Simplified the fix for calling the dtor of an abstract type with MinGW.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
e4a40d0eed
Revert "Fixed a crash when calling the dtor of an abstract type with MinGW."
...
This reverts commit 67e6e1204c
.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
176262c700
Clarified the handling of dtor calls when abstract classes are involved.
...
Thanks to tritao for his remarks.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
67e6e1204c
Fixed a crash when calling the dtor of an abstract type with MinGW.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
05a44565bd
Ensured a virtual dtor is called even if the base dtor is not virtual.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.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
0f8474893c
Removed 3 redundant fields from the C# generator.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
3cb44dcef0
Split the creation of internal parameters from their string representation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
0950b869a1
Fixed the offsets of fields when using multiple inheritance.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
6380e5d7ea
Called Marshal.FreeHGlobal only if the instance was created by Marshal.AllocHGlobal.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
6f8c942b0a
Adjusted pointers when calling functions from secondary or non-dynamic bases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
7d66303ed1
Extracted a constant and deleted a no longer used method.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
81e6ba5ea8
Ensured managed v-tables remain with no empty entries.
...
This doesn't fix any bug that I know of.
However, the patching was obviously wrong for v-tables with repetitive function pointers.
Their managed counterparts ended up with "holes" where the repetions were.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
324e241c25
Fixed the internal abstract impls with default params of a pointer type.
...
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
a20e3aca91
Properly set virtual tables up in the internal ctor by pointer.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
287ad2394d
Properly printed complex comments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
4cc60bed2a
Fixed the pass for multiple inheritance to keep original functions.
...
This would be useful in many situations where the original function is required, for example when looking for indices in v-tables.
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
87845ad51d
Fixed a regression with abstract types with the same property as a base type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
b9e3efbf0c
Removed the option for copy ctors and prevented usage of ignored ones.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
bb59ca17fb
Fixed a crash when a C++ ctor indirectly calls a virtual function on the object being constructed.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
55bc99bc3f
Fixed a bug when overriding a function located in a dependency.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago