diff options
Diffstat (limited to 'src/lib/eolian_cxx/grammar/type_function_declaration.hpp')
-rw-r--r-- | src/lib/eolian_cxx/grammar/type_function_declaration.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/eolian_cxx/grammar/type_function_declaration.hpp b/src/lib/eolian_cxx/grammar/type_function_declaration.hpp index 93ebe45940..71ca630f94 100644 --- a/src/lib/eolian_cxx/grammar/type_function_declaration.hpp +++ b/src/lib/eolian_cxx/grammar/type_function_declaration.hpp | |||
@@ -37,9 +37,9 @@ struct type_function_declaration_generator { | |||
37 | 37 | ||
38 | if (!as_generator( | 38 | if (!as_generator( |
39 | "template <typename F>\n" | 39 | "template <typename F>\n" |
40 | "struct function_wrapper<" << string << ", F> {\n" | 40 | "struct function_wrapper<" << string << ", F, struct " << string << "__function_tag> {\n" |
41 | << scope_tab << "function_wrapper(F cxx_func) : _cxx_func(cxx_func) {}\n" | 41 | << scope_tab << "function_wrapper(F cxx_func) : _cxx_func(cxx_func) {}\n" |
42 | ).generate(sink, f.c_name, ctx)) | 42 | ).generate(sink, std::make_tuple(f.c_name, f.c_name), ctx)) |
43 | return false; | 43 | return false; |
44 | 44 | ||
45 | if (!as_generator( | 45 | if (!as_generator( |
@@ -49,9 +49,9 @@ struct type_function_declaration_generator { | |||
49 | << "private:\n" | 49 | << "private:\n" |
50 | << scope_tab << "F _cxx_func;\n" | 50 | << scope_tab << "F _cxx_func;\n" |
51 | << scope_tab << "static void deleter(void *data) {\n" | 51 | << scope_tab << "static void deleter(void *data) {\n" |
52 | << scope_tab << scope_tab << "delete static_cast<function_wrapper<" << string << ", F>*>(data);\n" | 52 | << scope_tab << scope_tab << "delete static_cast<function_wrapper<" << string << ", F, ::efl::eolian::" << string << "__function_tag>*>(data);\n" |
53 | << scope_tab << "}\n" | 53 | << scope_tab << "}\n" |
54 | ).generate(sink, std::make_tuple(f.c_name, f.c_name), ctx)) | 54 | ).generate(sink, std::make_tuple(f.c_name, f.c_name, f.c_name), ctx)) |
55 | return false; | 55 | return false; |
56 | 56 | ||
57 | std::vector<std::string> c_args; | 57 | std::vector<std::string> c_args; |
@@ -61,8 +61,8 @@ struct type_function_declaration_generator { | |||
61 | scope_tab << "static " << string << " caller(void *cxx_call_data" | 61 | scope_tab << "static " << string << " caller(void *cxx_call_data" |
62 | << *(string) << ") {\n" | 62 | << *(string) << ") {\n" |
63 | << scope_tab << scope_tab << "auto fw = static_cast<function_wrapper<" | 63 | << scope_tab << scope_tab << "auto fw = static_cast<function_wrapper<" |
64 | << string << ", F>*>(cxx_call_data);\n" | 64 | << 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), ctx)) | 65 | ).generate(sink, std::make_tuple(f.return_type.c_type, c_args, f.c_name, f.c_name), ctx)) |
66 | return false; | 66 | return false; |
67 | 67 | ||
68 | if (f.return_type != attributes::void_ | 68 | if (f.return_type != attributes::void_ |