efl/src
Lucas Cavalcante de Sousa 117450e3fa C#: Update C# code-generation to use a new ICustomMarshaler in some string usages that were leaking
When `C` calls a function that return/has an out string and it was overwritten by `C#` inherit class the `C` portion
wasn't cleaning its copy. Now, when a `C` calls a `C#` delegate function, `Strings` that are `out` values or `return`
values use a new marshaler (specific to this case) that uses Eina short lived strings (`Eina_Slstr`) instead of
duplicating it with `strdup`, so at some point, the string passed to `C` is deleted.

To do so, a `direction_context` (a new `Context` at `generation_contexts.hh`) was created. It is only used when a C#
delegate is being called from C (so this context is only set in `function_definition.hh` and `property_definition.hh`,
where it is set to `native_to_manage` to indicate that it is a native call to a managed function).

When this `direction_context` is set and the `String` being marshaled is not marked with an `@move` tag and it is an
`out` or `return` value, the new `StringOutMarshaler` (implemented at `iwrapper.cs`) is used (instead of
`StringKeepOwnershipMarshaler`).

When marshaling a managed data to native this marshaler uses eina short lived string (`Eina_Slstr`) that will be
automatically deleted. This delete is bounded to "the loop of the current thread or until the clear function is called
explicitly" as said at `src/lib/eina/eina_slstr.h`.

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11434
2020-03-23 14:18:16 -03:00
..
benchmarks Fix build with gcc 10 (which has -fno-common enabled by default). 2020-01-31 14:31:57 +01:00
bin C#: Update C# code-generation to use a new ICustomMarshaler in some string usages that were leaking 2020-03-23 14:18:16 -03:00
bindings C#: Update C# code-generation to use a new ICustomMarshaler in some string usages that were leaking 2020-03-23 14:18:16 -03:00
edje_external
examples canvas3d: remove canvas3d examples. 2020-03-17 21:12:09 +09:00
generic remove vlc, gst-0.10, xine deps, modules as they are broken 2020-03-08 12:36:01 +00:00
lib efl_ui_widget: unify tree number settings code 2020-03-23 12:12:25 -04:00
modules ecore evas cnp x - fix nul byte extras when text pasting to other apps 2020-03-22 18:39:54 +00:00
scripts scripts - eina - remove eina-bench-cmp as its disbaled from install 2020-01-06 16:36:31 +00:00
static_libs vg_common_json: register shape name as it's designed. 2020-03-10 21:12:53 +09:00
tests efl_ui_widget: fix disabled set behaviour 2020-03-23 12:12:12 -04:00
wayland_protocol