summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/eolian_cxx/grammar/type_function_declaration.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/eolian_cxx/grammar/type_function_declaration.hpp b/src/lib/eolian_cxx/grammar/type_function_declaration.hpp
index 71ca630f94..fcd094fdf5 100644
--- a/src/lib/eolian_cxx/grammar/type_function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/type_function_declaration.hpp
@@ -56,10 +56,15 @@ struct type_function_declaration_generator {
56 56
57 std::vector<std::string> c_args; 57 std::vector<std::string> c_args;
58 for (auto itr : f.parameters) 58 for (auto itr : f.parameters)
59 c_args.push_back(", " + itr.type.c_type + " " + itr.param_name); 59 {
60 std::string arg;
61 if (!as_generator(grammar::c_type << " " << string).generate(std::back_inserter(arg), std::make_tuple(itr, itr.param_name), ctx))
62 return false;
63 c_args.push_back(arg);
64 }
60 if (!as_generator( 65 if (!as_generator(
61 scope_tab << "static " << string << " caller(void *cxx_call_data" 66 scope_tab << "static " << string << " caller(void *cxx_call_data"
62 << *(string) << ") {\n" 67 << *(", " << string) << ") {\n"
63 << scope_tab << scope_tab << "auto fw = static_cast<function_wrapper<" 68 << scope_tab << scope_tab << "auto fw = static_cast<function_wrapper<"
64 << string << ", F, ::efl::eolian::" << string << "__function_tag>*>(cxx_call_data);\n" 69 << string << ", F, ::efl::eolian::" << string << "__function_tag>*>(cxx_call_data);\n"
65 ).generate(sink, std::make_tuple(f.return_type.c_type, c_args, f.c_name, f.c_name), ctx)) 70 ).generate(sink, std::make_tuple(f.return_type.c_type, c_args, f.c_name, f.c_name), ctx))