* Introduce failing test for disposing bug
* Dispose(bool, bool) really shouldn't be public. Clients should call Dipose() instead.
Derived classes may need to call Dispose(bool, bool) so lets make it internal protected.
* feature: Add a mechanism to selectively initialize unmanaged memory in the default constructor. (C# Only at this point).
* Use the global:: prefix when calling InitBlock
* Changed support for marshaling "const char *"s as strings so that:
1) CppSharp.Types.Std.CSharpMarshalToNative generates setters that allocate unmanaged memory for the native bytes rather than an unpinned pointer into managed memory. Also set a null termination char.
2) Add tracking for when unmanaged memory is allocated for "const char *" strings. Free it when reassigned or dispsoed.
3) Added explicit support for Encoding.Default for ANSI support.
4) Allow setting a string value to null.
* Added test to prove that the unpinned ptr to managed memory approach wasn't working, and that the new approach appears to work.
* Change CSharpSources.GenerateDisposeMethods to free unmanaged memory held by IntPtr's corresponding to "const char *" strings.
* Changed copy constructor to deep-copy owned string refs to avoid ref counting.
* Update CSharpSources.GenerateFieldGetter to treat Char16 and Char32 the same as WideChar to avoid compilation errors on the generated sources if char32_t or char16_t are used.
* Added tests.
* Workaround for mac C++ compilation issue.
Changed Library.GenerateEnumFromMacro and friends to track the primitive type of the Enumeration while building an Enumeration's list of items so that we can support negative items within an Enumeration.
Fixed bugs in GetUnderlyingTypeForEnumValue where "<" should have been "<=" and Long should have been LongLong. Extended it to support negative values.
Added tests.
The warning is essentially a bug in msvc because it's harmless and requires exporting all accessible template specializations. See also http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
This allows for, just as with regular classes, the calling of virtual methods of abstract templates returned by functions.
Fixes https://github.com/mono/CppSharp/issues/1270.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
The test has also uncovered a bug where the call to a primary base isn't always adjusted so the fix is extended accordingly.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>