summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/function_registration.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/function_registration.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_registration.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index 90cbbc4..cc7534b 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -37,7 +37,8 @@ struct function_registration_generator
37 // auto index = index_generator(); 37 // auto index = index_generator();
38 38
39 if(!as_generator( 39 if(!as_generator(
40 scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" << 40 scope_tab << scope_tab << "if (" << f.c_name << "_static_delegate == null)\n"
41 << scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
41 escape_keyword(f.name) << ");\n" 42 escape_keyword(f.name) << ");\n"
42 ).generate(sink, attributes::unused, context)) 43 ).generate(sink, attributes::unused, context))
43 return false; 44 return false;
@@ -47,9 +48,9 @@ struct function_registration_generator
47#ifdef _WIN32 48#ifdef _WIN32
48 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")" 49 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")"
49#else 50#else
50 << "api_func = Efl.Eo.Globals.dlsym(Efl.Eo.Globals.RTLD_DEFAULT, \"" << string << "\")" 51 << "api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, \"" << string << "\")"
51#endif 52#endif
52 ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n" 53 << ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n"
53 ) 54 )
54 .generate(sink, std::make_tuple(f.c_name, f.c_name), context)) 55 .generate(sink, std::make_tuple(f.c_name, f.c_name), context))
55 return false; 56 return false;