diff options
author | Lauro Moura <lauromoura@gmail.com> | 2018-09-26 12:01:49 -0300 |
---|---|---|
committer | Vitor Sousa <vitorsousa@expertisesolutions.com.br> | 2018-09-26 12:16:09 -0300 |
commit | 8a4bac15e7a0a0a9f0901eee1dc7b23fc990d18e (patch) | |
tree | c3279b2bb75f020e0282b289674aaf89db040bef /src/bindings | |
parent | 064ae4f3a69108f28519beb12b5bb0786642b301 (diff) | |
download | efl-8a4bac15e7a0a0a9f0901eee1dc7b23fc990d18e.tar.gz |
efl-csharp: Fix event struct marshalling.
Summary:
The efl.Event struct has a class field that gets generated normally but
can be problematic when marshalling the struct back from C to C#. The
compilation works fine but when C# runtime tries to marshall the C data
(e.g. accessing the Event.Info field), it becomes erratic, either
complaining about missing references to object or even segfault.
This commit changes the event handling code to use the
"Event_StructInternal" struct as is already done when receiving structs
from C code.
In order to work with other assemblies, the _StructInternal fields were
made publit too.
Fixes the events tests and the text editor app.
Test Plan: make check and run the text editor app in examples repo.
Reviewers: segfaultxavi, vitor.sousa
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7106
Diffstat (limited to 'src/bindings')
-rw-r--r-- | src/bindings/mono/eo_mono/workaround.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bindings/mono/eo_mono/workaround.cs b/src/bindings/mono/eo_mono/workaround.cs index 26afcefcb6..253e3758f3 100644 --- a/src/bindings/mono/eo_mono/workaround.cs +++ b/src/bindings/mono/eo_mono/workaround.cs @@ -106,7 +106,7 @@ public struct Event_Description { }; -public delegate void Event_Cb(System.IntPtr data, ref Event evt); +public delegate void Event_Cb(System.IntPtr data, ref Event_StructInternal evt); #pragma warning disable 0169 public struct Dbg_Info { IntPtr name; |