aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile_Efl_Mono.am
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-03-15 20:32:39 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-03-16 11:12:49 -0300
commit2705ea853108a64edc9264c8e5d4c79e55aea001 (patch)
tree7cbb95f4667ce4fa3d6c44a7b8e0e196a1ca757c /src/Makefile_Efl_Mono.am
parentcsharp: Change policy on ptr(struct) owned calls (diff)
downloadefl-2705ea853108a64edc9264c8e5d4c79e55aea001.tar.gz
csharp: Fix support for ptr(structs)
In general, ptr(struct) parameters behavior depends whether the parameter has the @owned modifier or not. If there is no @owned parameter (meaning no transfer of ownership happens) and it is a "complex" struct, with reference type fields (like strings), the struct is converted to the respective <Struct>Internal struct and passed with "ref" to the DllImport'd function. For @in parameters, after the function it returns, this intermediate struct is converted to the public struct type and assigned to the original parameter, updating it to the external world. When we have ownership transfers, the structure is copied to unmanaged memory and given to the callee. We can't send managed memory directly as the callee may try to free it. On the managed side, the original struct is left to be garbage collected normally.
Diffstat (limited to 'src/Makefile_Efl_Mono.am')
-rw-r--r--src/Makefile_Efl_Mono.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am
index e442d09fb5..1f718ecc28 100644
--- a/src/Makefile_Efl_Mono.am
+++ b/src/Makefile_Efl_Mono.am
@@ -419,6 +419,7 @@ TESTS += tests/efl_mono/mono_test_driver.sh
tests_efl_mono_efl_mono_SOURCES = \
tests/efl_mono/Main.cs \
+ tests/efl_mono/BasicDirection.cs \
tests/efl_mono/Eina.cs \
tests/efl_mono/Eldbus.cs \
tests/efl_mono/Eo.cs \