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.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index e8a41047f9..0b8da4a05a 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -35,14 +35,20 @@ struct function_registration_generator
35 else 35 else
36 { 36 {
37 auto index = index_generator(); 37 auto index = index_generator();
38 38
39 if(!as_generator(
40 scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
41 escape_keyword(f.name) << ");\n"
42 ).generate(sink, attributes::unused, context))
43 return false;
44
39 if(!as_generator 45 if(!as_generator
40#ifdef _WIN32 46#ifdef _WIN32
41 (scope_tab << scope_tab << "descs[" << index << "].api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\");\n" 47 (scope_tab << scope_tab << "descs[" << index << "].api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\");\n"
42#else 48#else
43 (scope_tab << scope_tab << "descs[" << index << "].api_func = Efl.Eo.Globals.dlsym(Efl.Eo.Globals.RTLD_DEFAULT, \"" << string << "\");\n" 49 (scope_tab << scope_tab << "descs[" << index << "].api_func = Efl.Eo.Globals.dlsym(Efl.Eo.Globals.RTLD_DEFAULT, \"" << string << "\");\n"
44#endif 50#endif
45 << scope_tab << scope_tab << "descs[" << index << "].func = Marshal.GetFunctionPointerForDelegate(" << name_helpers::klass_native_inherit_name(*klass) << "." << string << "_static_delegate);\n" 51 << scope_tab << scope_tab << "descs[" << index << "].func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate);\n"
46 ) 52 )
47 .generate(sink, std::make_tuple(f.c_name, f.c_name), context)) 53 .generate(sink, std::make_tuple(f.c_name, f.c_name), context))
48 return false; 54 return false;