summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eina_mono/eina_common.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/eina_mono/eina_common.cs')
-rw-r--r--src/bindings/mono/eina_mono/eina_common.cs21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/bindings/mono/eina_mono/eina_common.cs b/src/bindings/mono/eina_mono/eina_common.cs
index badd62e..a4f2ff4 100644
--- a/src/bindings/mono/eina_mono/eina_common.cs
+++ b/src/bindings/mono/eina_mono/eina_common.cs
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#pragma warning disable 1591 16#pragma warning disable 1591
2 17
3using System; 18using System;
@@ -16,7 +31,7 @@ internal delegate void EinaFreeCb(IntPtr data);
16 31
17} 32}
18 33
19internal static class NativeCustomExportFunctions 34internal static partial class NativeCustomExportFunctions
20{ 35{
21 [DllImport(efl.Libs.CustomExports)] public static extern void 36 [DllImport(efl.Libs.CustomExports)] public static extern void
22 efl_mono_native_free(IntPtr ptr); 37 efl_mono_native_free(IntPtr ptr);
@@ -190,10 +205,10 @@ public static class StringConversion
190 Marshal.WriteByte(native + strbuf.Length, 0); // write the terminating null 205 Marshal.WriteByte(native + strbuf.Length, 0); // write the terminating null
191 return native; 206 return native;
192 } 207 }
193 catch(Exception e) 208 catch (Exception)
194 { 209 {
195 MemoryNative.Free(native); 210 MemoryNative.Free(native);
196 throw e; 211 throw;
197 } 212 }
198 } 213 }
199 214