summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-03-03 15:10:13 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-03-03 16:05:40 -0300
commit9cbda57bf03bfdaa5c0379023a05868b2f0986aa (patch)
treedebe60f34d6352ae562a575693289c068fc689b3 /src/lib/eolian_cxx
parent5c7d78d1040b5bdfe6430e84c90d36ab8bf27064 (diff)
eolian-cxx: Fix Eolian C++ constructing methods with new eo_add
Also fix Eolian C++ examples using the new "eo_super".
Diffstat (limited to 'src/lib/eolian_cxx')
-rw-r--r--src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh
index 74c9c32883..2a7091ad02 100644
--- a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh
+++ b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh
@@ -158,9 +158,10 @@ operator<<(std::ostream& out, functors_constructor_methods const& x)
158 << tab(2) << "{}" << endl; 158 << tab(2) << "{}" << endl;
159 159
160 // Struct operator() 160 // Struct operator()
161 out << tab(2) << "void operator()()" << endl 161 out << tab(2) << "void operator()(Eo* _obj_eoid)" << endl
162 << tab(2) << "{" << endl 162 << tab(2) << "{" << endl
163 << tab(3) << "::" << c.impl << "(" << parameters_forward_to_c(c.params) << ");" << endl 163 << tab(3) << "::" << c.impl << "(_obj_eoid" << (c.params.empty() ? "" : ", ")
164 << parameters_forward_to_c(c.params) << ");" << endl
164 << tab(2) << "}" << endl; 165 << tab(2) << "}" << endl;
165 166
166 // Register event to free allocated callbacks when the Eo* is deleted 167 // Register event to free allocated callbacks when the Eo* is deleted
@@ -579,10 +580,10 @@ operator<<(std::ostream& out, function_call_constructor_methods const& x)
579 << tab(2) << "Eo* _ret_eo = eo_add_ref(" << x._cls.eo_name << ", _p._eo_raw"; 580 << tab(2) << "Eo* _ret_eo = eo_add_ref(" << x._cls.eo_name << ", _p._eo_raw";
580 for (it = first; it != last; ++it) 581 for (it = first; it != last; ++it)
581 { 582 {
582 out << ", _c" << (it-first) << "()"; 583 out << ", _c" << (it-first) << "(eoid)";
583 } 584 }
584 if (!x._cls.optional_constructors.empty()) 585 if (!x._cls.optional_constructors.empty())
585 out << ", ::efl::eolian::call_ctors(_opts...)"; 586 out << ", ::efl::eolian::call_ctors(eoid, _opts...)";
586 out << ");" << endl << endl; 587 out << ");" << endl << endl;
587 588
588 for (it = first; it != last; ++it) 589 for (it = first; it != last; ++it)