summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/function_definition.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/function_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 915b12e..77fda50 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -41,7 +41,8 @@ struct native_function_definition_generator
41 { 41 {
42 if(!as_generator 42 if(!as_generator
43 ("\n\n" << scope_tab 43 ("\n\n" << scope_tab
44 << eolian_mono::marshall_native_annotation(true) 44 << eolian_mono::marshall_annotation(true)
45 // << eolian_mono::marshall_native_annotation(true)
45 << " private delegate " 46 << " private delegate "
46 << eolian_mono::marshall_type(true) 47 << eolian_mono::marshall_type(true)
47 << " " 48 << " "
@@ -49,14 +50,15 @@ struct native_function_definition_generator
49 << "_delegate(System.IntPtr obj, System.IntPtr pd" 50 << "_delegate(System.IntPtr obj, System.IntPtr pd"
50 << *grammar::attribute_reorder<-1, -1> 51 << *grammar::attribute_reorder<-1, -1>
51 ( 52 (
52 (", " << marshall_native_annotation << " " << marshall_parameter) 53 (", " << marshall_annotation /*marshall_native_annotation*/ << " " << marshall_parameter)
53 ) 54 )
54 << ");\n") 55 << ");\n")
55 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context)) 56 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
56 return false; 57 return false;
57 if(!as_generator 58 if(!as_generator
58 ("\n\n" << scope_tab 59 ("\n\n" << scope_tab
59 << eolian_mono::marshall_native_annotation(true) 60 << eolian_mono::marshall_annotation(true)
61 // << eolian_mono::marshall_native_annotation(true)
60 << " public delegate " 62 << " public delegate "
61 << eolian_mono::marshall_type(true) 63 << eolian_mono::marshall_type(true)
62 << " " 64 << " "
@@ -64,7 +66,7 @@ struct native_function_definition_generator
64 << "_api_delegate(System.IntPtr obj" 66 << "_api_delegate(System.IntPtr obj"
65 << *grammar::attribute_reorder<-1, -1> 67 << *grammar::attribute_reorder<-1, -1>
66 ( 68 (
67 (", " << marshall_native_annotation << " " << marshall_parameter) 69 (", " << marshall_annotation /*marshall_native_annotation*/ << " " << marshall_parameter)
68 ) 70 )
69 << ");\n") 71 << ");\n")
70 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context)) 72 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
@@ -131,7 +133,7 @@ struct native_function_definition_generator
131 133
132 // This is the delegate that will be passed to Eo to be called from C. 134 // This is the delegate that will be passed to Eo to be called from C.
133 if(!as_generator( 135 if(!as_generator(
134 scope_tab << "private " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n" 136 scope_tab << "private static " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n"
135 ).generate(sink, attributes::unused, context)) 137 ).generate(sink, attributes::unused, context))
136 return false; 138 return false;
137 return true; 139 return true;