summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 10:47:09 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 15:01:45 +0900
commit8cdb3184f8a1f3e5396d953b238ce2e217f0cb1c (patch)
treebbd99d8e8616588f69360281d8291fb34fffb7e6
parent2b0805ddce66903c73c82047772f695b70c3b810 (diff)
cxx: Fix compilation after merge
This resolves a few issues and brings back the experimental features. Also, disable some of the ugliest experiments: - manual function overrides, - define APIs only in eo_cxx namespace Some APIs are generated behind EFL_CXXPERIMENT (eg. event_name_cb_add or some weak pointer stuff). I believe they are useful but would like to make sure there are no serious drawbacks with generating those.
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc52
-rw-r--r--src/examples/elementary/popup_cxx_example.cc3
-rw-r--r--src/lib/eolian_cxx/grammar/class_definition.hpp37
-rw-r--r--src/lib/eolian_cxx/grammar/context.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/function_declaration.hpp4
-rw-r--r--src/lib/eolian_cxx/grammar/function_definition.hpp4
-rw-r--r--src/lib/eolian_cxx/grammar/generator.hpp1
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp8
-rw-r--r--src/lib/eolian_cxx/grammar/parameter.hpp10
-rw-r--r--src/lib/eolian_cxx/grammar/part_declaration.hpp3
-rw-r--r--src/lib/eolian_cxx/grammar/part_implementation.hpp3
-rw-r--r--src/lib/eolian_cxx/grammar/type_function_declaration.hpp5
12 files changed, 54 insertions, 78 deletions
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 3720aa9251..134700ae6c 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -241,55 +241,9 @@ types_generate(std::string const& fname, options_type const& opts,
241 const Eolian_Function *func = eolian_typedecl_function_pointer_get(tp); 241 const Eolian_Function *func = eolian_typedecl_function_pointer_get(tp);
242 if (!func) return false; 242 if (!func) return false;
243 243
244 Eina_Iterator *param_itr = eolian_function_parameters_get(func); 244 function_def def(func, EOLIAN_FUNCTION_POINTER, opts.unit);
245 std::vector<parameter_def> params; 245 def.c_name = eolian_typedecl_full_name_get(tp);
246 246 std::replace(def.c_name.begin(), def.c_name.end(), '.', '_');
247 /* const */ Eolian_Function_Parameter *param;
248 while (::eina_iterator_next(param_itr, reinterpret_cast<void **>(&param)))
249 {
250 parameter_direction param_dir;
251 switch (eolian_parameter_direction_get(param))
252 {
253 /* Note: Inverted on purpose, as the direction objects are
254 * passed is inverted (from C to C++ for function pointers).
255 * FIXME: This is probably not right in all cases. */
256 case EOLIAN_IN_PARAM: param_dir = parameter_direction::out; break;
257 case EOLIAN_INOUT_PARAM: param_dir = parameter_direction::inout; break;
258 case EOLIAN_OUT_PARAM: param_dir = parameter_direction::in; break;
259 default: return false;
260 }
261
262 const Eolian_Type *param_type_eolian = eolian_parameter_type_get(param);
263 type_def param_type(param_type_eolian, opts.unit, EOLIAN_C_TYPE_PARAM);
264 std::string param_name = eolian_parameter_name_get(param);
265 std::string param_c_type = eolian_type_c_type_get(param_type_eolian, EOLIAN_C_TYPE_PARAM);
266 parameter_def param_def(param_dir, param_type, param_name, param_c_type);
267 params.push_back(std::move(param_def));
268 }
269 ::eina_iterator_free(param_itr);
270
271 const Eolian_Type *ret_type_eolian = eolian_function_return_type_get(func, EOLIAN_FUNCTION_POINTER);
272
273 type_def ret_type = void_;
274 if (ret_type_eolian)
275 ret_type = type_def(ret_type_eolian, opts.unit, EOLIAN_C_TYPE_RETURN);
276
277 /*
278 // List namespaces. Not used as function_wrapper lives in efl::eolian.
279 std::vector<std::string> namespaces;
280 Eina_Iterator *ns_itr = eolian_typedecl_namespaces_get(tp);
281 char *ns;
282 while (::eina_iterator_next(ns_itr, reinterpret_cast<void**>(&ns)))
283 namespaces.push_back(std::string(ns));
284 ::eina_iterator_free(ns_itr);
285 */
286
287 std::string name = eolian_function_name_get(func);
288 std::string c_name = eolian_typedecl_full_name_get(tp);
289 std::replace(c_name.begin(), c_name.end(), '.', '_');
290 bool beta = eolian_function_is_beta(func);
291
292 function_def def(ret_type, name, params, c_name, beta, false, true);
293 functions.push_back(std::move(def)); 247 functions.push_back(std::move(def));
294 } 248 }
295 ::eina_iterator_free(itr); 249 ::eina_iterator_free(itr);
diff --git a/src/examples/elementary/popup_cxx_example.cc b/src/examples/elementary/popup_cxx_example.cc
index 8a06a81ac0..7c6d85ce7a 100644
--- a/src/examples/elementary/popup_cxx_example.cc
+++ b/src/examples/elementary/popup_cxx_example.cc
@@ -1,6 +1,7 @@
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` popup_cxx_example.cc -o popup_cxx_example 1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` popup_cxx_example.cc -o popup_cxx_example
2 2
3#define EFL_CXX_WREF_EASY 3#define EFL_CXXPERIMENTAL
4
4#include <Evas.hh> 5#include <Evas.hh>
5#include <Elementary.hh> 6#include <Elementary.hh>
6#include <iostream> 7#include <iostream>
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 771121d8ee..b282f71bf9 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -208,26 +208,17 @@ struct class_definition_generator
208 if(!as_generator(scope_tab << "/// @endcond\n").generate(sink, attributes::unused, context)) return false; 208 if(!as_generator(scope_tab << "/// @endcond\n").generate(sink, attributes::unused, context)) return false;
209 209
210 // EXPERIMENTAL: Parts 210 // EXPERIMENTAL: Parts
211 if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, attributes::unused, context)) return false; 211 if (!cls.parts.empty())
212 if(!as_generator(*(scope_tab << part_declaration << ";\n")) 212 {
213 .generate(sink, cls.parts, context)) return false; 213 if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, attributes::unused, context)) return false;
214 if(!as_generator("#endif \n").generate(sink, attributes::unused, context)) return false; 214 if(!as_generator(*(scope_tab << part_declaration << ";\n"))
215 .generate(sink, cls.parts, context)) return false;
216 if(!as_generator("#endif \n").generate(sink, attributes::unused, context)) return false;
217 }
215 218
216 if(!as_generator( scope_tab << "::efl::eo::wref<" << string << "> _get_wref() const { " 219 if(!as_generator( scope_tab << "::efl::eo::wref<" << string << "> _get_wref() const { "
217 "return ::efl::eo::wref<" << string << ">(*this); }\n" 220 "return ::efl::eo::wref<" << string << ">(*this); }\n"
218 ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false; 221 ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false;
219
220 // EXPERIMENTAL: wref and implicit conversion to Eo*
221 if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, attributes::unused, context)) return false;
222 // For easy wref, operator-> in wref needs to also return a pointer type
223 if(!as_generator( scope_tab << "const " << string << "* operator->() const { return this; }\n"
224 ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false;
225 if(!as_generator( scope_tab << string << "* operator->() { return this; }\n"
226 ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false;
227 // For easy interfacing with C: no need to use _eo_ptr()
228 if(!as_generator( scope_tab << "operator Eo*() const { return _eo_ptr(); }\n"
229 ).generate(sink, attributes::unused, context)) return false;
230 if(!as_generator("#endif \n").generate(sink, attributes::unused, context)) return false;
231 222
232 // eo_concrete 223 // eo_concrete
233 if(!as_generator( scope_tab << "::efl::eo::concrete const& _get_concrete() const { return *this; }\n" 224 if(!as_generator( scope_tab << "::efl::eo::concrete const& _get_concrete() const { return *this; }\n"
@@ -241,6 +232,18 @@ struct class_definition_generator
241 << scope_tab << "using ::efl::eo::concrete::operator bool;\n" 232 << scope_tab << "using ::efl::eo::concrete::operator bool;\n"
242 ).generate(sink, attributes::unused, context)) return false; 233 ).generate(sink, attributes::unused, context)) return false;
243 234
235 // EXPERIMENTAL: wref and implicit conversion to Eo*
236 if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, attributes::unused, context)) return false;
237 // For easy wref, operator-> in wref needs to also return a pointer type
238 if(!as_generator( scope_tab << "const " << string << "* operator->() const { return this; }\n"
239 ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false;
240 if(!as_generator( scope_tab << string << "* operator->() { return this; }\n"
241 ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false;
242 // For easy interfacing with C: no need to use _eo_ptr()
243 if(!as_generator( scope_tab << "operator Eo*() const { return _eo_ptr(); }\n"
244 ).generate(sink, attributes::unused, context)) return false;
245 if(!as_generator("#endif \n").generate(sink, attributes::unused, context)) return false;
246
244 if(!as_generator( scope_tab << "friend bool operator==(" << string << " const& lhs, " << string << " const& rhs)\n" 247 if(!as_generator( scope_tab << "friend bool operator==(" << string << " const& lhs, " << string << " const& rhs)\n"
245 << scope_tab << "{ return lhs._get_concrete() == rhs._get_concrete(); }\n" 248 << scope_tab << "{ return lhs._get_concrete() == rhs._get_concrete(); }\n"
246 << scope_tab << "friend bool operator!=(" << string << " const& lhs, " << string << " const& rhs)\n" 249 << scope_tab << "friend bool operator!=(" << string << " const& lhs, " << string << " const& rhs)\n"
diff --git a/src/lib/eolian_cxx/grammar/context.hpp b/src/lib/eolian_cxx/grammar/context.hpp
index 79e54178e0..e4839200bc 100644
--- a/src/lib/eolian_cxx/grammar/context.hpp
+++ b/src/lib/eolian_cxx/grammar/context.hpp
@@ -56,7 +56,7 @@ Tag const& context_find_tag(context_cons<OtherTag, Tail> const& context
56} 56}
57 57
58template <typename Tag, typename OtherTag, typename Tail> 58template <typename Tag, typename OtherTag, typename Tail>
59Tag const& context_find_tag(context_null const& context) 59Tag const& context_find_tag(context_null const&)
60{ 60{
61 throw std::logic_error("Context for generation not available"); 61 throw std::logic_error("Context for generation not available");
62} 62}
diff --git a/src/lib/eolian_cxx/grammar/function_declaration.hpp b/src/lib/eolian_cxx/grammar/function_declaration.hpp
index a2770abf18..f30f7569dc 100644
--- a/src/lib/eolian_cxx/grammar/function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/function_declaration.hpp
@@ -48,10 +48,12 @@ struct function_declaration_generator
48 .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx))) 48 .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
49 return false; 49 return false;
50 50
51#ifdef USE_EOCXX_MANUAL_OVERRIDES
51 if(!as_generator 52 if(!as_generator
52 ("#ifndef EOLIAN_CXX_" << string << "_DECLARATION\n") 53 ("#ifndef EOLIAN_CXX_" << string << "_DECLARATION\n")
53 .generate(sink, f.c_name, add_upper_case_context(ctx))) 54 .generate(sink, f.c_name, add_upper_case_context(ctx)))
54 return false; 55 return false;
56#endif
55 57
56 std::string template_statement(f.template_statement()); 58 std::string template_statement(f.template_statement());
57 if (!template_statement.empty() && 59 if (!template_statement.empty() &&
@@ -68,11 +70,13 @@ struct function_declaration_generator
68 .generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters), ctx)) 70 .generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters), ctx))
69 return false; 71 return false;
70 72
73#ifdef USE_EOCXX_MANUAL_OVERRIDES
71 if(!as_generator 74 if(!as_generator
72 ("#else\n" << scope_tab << "EOLIAN_CXX_" << string << "_DECLARATION\n" 75 ("#else\n" << scope_tab << "EOLIAN_CXX_" << string << "_DECLARATION\n"
73 "#endif\n") 76 "#endif\n")
74 .generate(sink, f.c_name, add_upper_case_context(ctx))) 77 .generate(sink, f.c_name, add_upper_case_context(ctx)))
75 return false; 78 return false;
79#endif
76 80
77 if(f.is_protected && 81 if(f.is_protected &&
78 !as_generator("#endif\n").generate(sink, attributes::unused, ctx)) 82 !as_generator("#endif\n").generate(sink, attributes::unused, ctx))
diff --git a/src/lib/eolian_cxx/grammar/function_definition.hpp b/src/lib/eolian_cxx/grammar/function_definition.hpp
index 46df876b33..3161b76041 100644
--- a/src/lib/eolian_cxx/grammar/function_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/function_definition.hpp
@@ -54,10 +54,12 @@ struct function_definition_generator
54 .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx))) 54 .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
55 return false; 55 return false;
56 56
57#ifdef USE_EOCXX_MANUAL_OVERRIDES
57 if(!as_generator 58 if(!as_generator
58 ("#ifndef EOLIAN_CXX_" << string << "_IMPLEMENTATION\n") 59 ("#ifndef EOLIAN_CXX_" << string << "_IMPLEMENTATION\n")
59 .generate(sink, f.c_name, add_upper_case_context(ctx))) 60 .generate(sink, f.c_name, add_upper_case_context(ctx)))
60 return false; 61 return false;
62#endif
61 63
62 std::string template_statement(f.template_statement()); 64 std::string template_statement(f.template_statement());
63 if (!template_statement.empty() && 65 if (!template_statement.empty() &&
@@ -166,11 +168,13 @@ struct function_definition_generator
166 if(!as_generator("}\n").generate(sink, attributes::unused, ctx)) 168 if(!as_generator("}\n").generate(sink, attributes::unused, ctx))
167 return false; 169 return false;
168 170
171#ifdef USE_EOCXX_MANUAL_OVERRIDES
169 if(!as_generator 172 if(!as_generator
170 ("#else\n" << scope_tab << "EOLIAN_CXX_" << string << "_IMPLEMENTATION\n" 173 ("#else\n" << scope_tab << "EOLIAN_CXX_" << string << "_IMPLEMENTATION\n"
171 "#endif\n") 174 "#endif\n")
172 .generate(sink, f.c_name, add_upper_case_context(ctx))) 175 .generate(sink, f.c_name, add_upper_case_context(ctx)))
173 return false; 176 return false;
177#endif
174 178
175 if(f.is_beta && 179 if(f.is_beta &&
176 !as_generator("#endif\n").generate(sink, attributes::unused, ctx)) 180 !as_generator("#endif\n").generate(sink, attributes::unused, ctx))
diff --git a/src/lib/eolian_cxx/grammar/generator.hpp b/src/lib/eolian_cxx/grammar/generator.hpp
index 10e96c7c13..6d0be7e4f1 100644
--- a/src/lib/eolian_cxx/grammar/generator.hpp
+++ b/src/lib/eolian_cxx/grammar/generator.hpp
@@ -5,6 +5,7 @@
5 5
6// EXPERIMENTAL 6// EXPERIMENTAL
7//#define USE_EOCXX_INHERIT_ONLY 7//#define USE_EOCXX_INHERIT_ONLY
8//#define USE_EOCXX_MANUAL_OVERRIDES
8 9
9namespace efl { namespace eolian { namespace grammar { 10namespace efl { namespace eolian { namespace grammar {
10 11
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index b2aae1bbef..1cb5ecfba0 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -458,17 +458,15 @@ struct function_def
458 return !(lhs == rhs); 458 return !(lhs == rhs);
459 } 459 }
460 function_def() = default; 460 function_def() = default;
461 function_def(type_def return_type, std::string name, std::vector<parameter_def> parameters
462 , std::string c_name, std::string filename, bool is_beta)
463 : return_type(return_type), name(name), parameters(parameters), c_name(c_name), filename(filename), is_beta(is_beta) {}
464 function_def(type_def _return_type, std::string const& _name, 461 function_def(type_def _return_type, std::string const& _name,
465 std::vector<parameter_def> const& _parameters, 462 std::vector<parameter_def> const& _parameters,
466 std::string const& _c_name, 463 std::string const& _c_name,
464 std::string _filename,
467 bool _is_beta = false, 465 bool _is_beta = false,
468 bool _is_protected = false, 466 bool _is_protected = false,
469 bool _is_function_pointer = false) 467 bool _is_function_pointer = false)
470 : return_type(_return_type), name(_name), parameters(_parameters), 468 : return_type(_return_type), name(_name), parameters(_parameters),
471 c_name(_c_name), is_beta(_is_beta), is_protected(_is_protected), 469 c_name(_c_name), filename(_filename), is_beta(_is_beta), is_protected(_is_protected),
472 is_function_pointer(_is_function_pointer) {} 470 is_function_pointer(_is_function_pointer) {}
473 471
474 function_def( ::Eolian_Function const* function, Eolian_Function_Type type, Eolian_Unit const* unit) 472 function_def( ::Eolian_Function const* function, Eolian_Function_Type type, Eolian_Unit const* unit)
@@ -572,7 +570,7 @@ struct function_def
572 char typenam[2] = { 0, }; 570 char typenam[2] = { 0, };
573 typenam[0] = template_typename++; 571 typenam[0] = template_typename++;
574 std::string statement = "auto fw = new ::efl::eolian::function_wrapper<"; 572 std::string statement = "auto fw = new ::efl::eolian::function_wrapper<";
575 statement += param.c_type + ", " + typenam + ">(" + param.param_name + ");"; 573 statement += param.type.c_type + ", " + typenam + ">(" + param.param_name + ");";
576 statements.push_back(statement); 574 statements.push_back(statement);
577 } 575 }
578 } 576 }
diff --git a/src/lib/eolian_cxx/grammar/parameter.hpp b/src/lib/eolian_cxx/grammar/parameter.hpp
index 5d8d3aef5c..68f5450dd1 100644
--- a/src/lib/eolian_cxx/grammar/parameter.hpp
+++ b/src/lib/eolian_cxx/grammar/parameter.hpp
@@ -78,12 +78,20 @@ struct parameter_as_argument_generator
78 template <typename OutputIterator, typename Context> 78 template <typename OutputIterator, typename Context>
79 bool generate(OutputIterator sink, attributes::parameter_def const& param, Context const& context) const 79 bool generate(OutputIterator sink, attributes::parameter_def const& param, Context const& context) const
80 { 80 {
81 return as_generator(parameter_type << "(" << string << ")").generate(sink, std::make_tuple(param, param.param_name), context); 81 attributes::parameter_def param_copy = param;
82 if (param.direction == attributes::parameter_direction::in)
83 param_copy.direction = attributes::parameter_direction::out;
84 else if (param.direction == attributes::parameter_direction::out)
85 param_copy.direction = attributes::parameter_direction::in;
86 return as_generator(parameter_type << "(" << string << ")")
87 .generate(sink, std::make_tuple(param_copy, param_copy.param_name), context);
82 } 88 }
83}; 89};
84 90
85template <> 91template <>
86struct is_eager_generator<parameter_as_argument_generator> : std::true_type {}; 92struct is_eager_generator<parameter_as_argument_generator> : std::true_type {};
93template <>
94struct is_generator<parameter_as_argument_generator> : std::true_type {};
87namespace type_traits { 95namespace type_traits {
88template <> 96template <>
89struct attributes_needed<parameter_as_argument_generator> : std::integral_constant<int, 1> {}; 97struct attributes_needed<parameter_as_argument_generator> : std::integral_constant<int, 1> {};
diff --git a/src/lib/eolian_cxx/grammar/part_declaration.hpp b/src/lib/eolian_cxx/grammar/part_declaration.hpp
index 04258c4020..30646fcbae 100644
--- a/src/lib/eolian_cxx/grammar/part_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/part_declaration.hpp
@@ -31,7 +31,8 @@ struct part_declaration_generator
31 31
32template <> 32template <>
33struct is_eager_generator<part_declaration_generator> : std::true_type {}; 33struct is_eager_generator<part_declaration_generator> : std::true_type {};
34 34template <>
35struct is_generator<part_declaration_generator> : std::true_type {};
35namespace type_traits { 36namespace type_traits {
36template <> 37template <>
37struct attributes_needed<part_declaration_generator> : std::integral_constant<int, 1> {}; 38struct attributes_needed<part_declaration_generator> : std::integral_constant<int, 1> {};
diff --git a/src/lib/eolian_cxx/grammar/part_implementation.hpp b/src/lib/eolian_cxx/grammar/part_implementation.hpp
index cee2fc7fa8..692ebca7c1 100644
--- a/src/lib/eolian_cxx/grammar/part_implementation.hpp
+++ b/src/lib/eolian_cxx/grammar/part_implementation.hpp
@@ -53,7 +53,8 @@ private:
53 53
54template <> 54template <>
55struct is_eager_generator<part_implementation_generator> : std::true_type {}; 55struct is_eager_generator<part_implementation_generator> : std::true_type {};
56 56template <>
57struct is_generator<part_implementation_generator> : std::true_type {};
57namespace type_traits { 58namespace type_traits {
58template <> 59template <>
59struct attributes_needed<part_implementation_generator> : std::integral_constant<int, 1> {}; 60struct attributes_needed<part_implementation_generator> : std::integral_constant<int, 1> {};
diff --git a/src/lib/eolian_cxx/grammar/type_function_declaration.hpp b/src/lib/eolian_cxx/grammar/type_function_declaration.hpp
index eccedf8f4a..93ebe45940 100644
--- a/src/lib/eolian_cxx/grammar/type_function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/type_function_declaration.hpp
@@ -56,7 +56,7 @@ 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.c_type + " " + itr.param_name); 59 c_args.push_back(", " + itr.type.c_type + " " + itr.param_name);
60 if (!as_generator( 60 if (!as_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"
@@ -102,7 +102,8 @@ struct type_function_declaration_generator {
102 102
103template <> 103template <>
104struct is_eager_generator<type_function_declaration_generator> : std::true_type {}; 104struct is_eager_generator<type_function_declaration_generator> : std::true_type {};
105 105template <>
106struct is_generator<type_function_declaration_generator> : std::true_type {};
106namespace type_traits { 107namespace type_traits {
107template <> 108template <>
108struct attributes_needed<type_function_declaration_generator> : std::integral_constant<int, 1> {}; 109struct attributes_needed<type_function_declaration_generator> : std::integral_constant<int, 1> {};