summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/grammar/klass_def.hpp
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2018-01-12 18:45:13 +0900
committerThiep Ha <thiepha@gmail.com>2018-01-12 18:45:40 +0900
commit360ce182efa373598b39225a8458f8e36d110fe1 (patch)
tree95a19d639a883334fd5955706a036eae7164451e /src/lib/eolian_cxx/grammar/klass_def.hpp
parentf7d9f0dde6b7bf5aae1124682e59373572dd3f90 (diff)
eolian_cxx: support multiple function pointers
Diffstat (limited to '')
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 16d15b6f24..baaa61382e 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -703,7 +703,6 @@ struct function_def
703 703
704 std::vector<std::string> opening_statements() const 704 std::vector<std::string> opening_statements() const
705 { 705 {
706 // FIXME: Supports only one function pointer
707 std::vector<std::string> statements; 706 std::vector<std::string> statements;
708 char template_typename = 'F'; 707 char template_typename = 'F';
709 for (auto const& param : this->parameters) 708 for (auto const& param : this->parameters)
@@ -714,7 +713,7 @@ struct function_def
714 { 713 {
715 char typenam[2] = { 0, }; 714 char typenam[2] = { 0, };
716 typenam[0] = template_typename++; 715 typenam[0] = template_typename++;
717 std::string statement = "auto fw = new ::efl::eolian::function_wrapper<"; 716 std::string statement = "auto fw_" + param.param_name + " = new ::efl::eolian::function_wrapper<";
718 statement += param.type.c_type + ", " + typenam + ">(" + param.param_name + ");"; 717 statement += param.type.c_type + ", " + typenam + ">(" + param.param_name + ");";
719 statements.push_back(statement); 718 statements.push_back(statement);
720 } 719 }