diff options
author | Savio Sena <savio@expertisesolutions.com.br> | 2014-06-26 16:43:28 -0300 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2014-06-26 20:59:01 +0100 |
commit | 76f43a679bcd6d81bd9073b995fae6b9bd6de6c2 (patch) | |
tree | 8d83e60f495f3f43cf3c135891aea6cf320e0b3f | |
parent | d7793e0198a170c8e4d61103d0996e68458a3059 (diff) | |
download | efl-76f43a679bcd6d81bd9073b995fae6b9bd6de6c2.tar.gz |
eolian-cxx: Fixed a bug in the generation of namespaces.
Also took the chance and changed some minor cosmetics.
-rw-r--r-- | src/bin/eolian_cxx/convert.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc index 4f6ba4d8f9..3b9c486d5a 100644 --- a/src/bin/eolian_cxx/convert.cc +++ b/src/bin/eolian_cxx/convert.cc @@ -191,7 +191,7 @@ void convert_eolian_inheritances(efl::eolian::eo_class& cls, Eolian_Class const& klass) { const Eina_List *inheritances = - eolian_class_inherits_list_get(klass); + ::eolian_class_inherits_list_get(klass); const Eina_List *it; void *curr; @@ -203,11 +203,13 @@ convert_eolian_inheritances(efl::eolian::eo_class& cls, Eolian_Class const& klas } else { - const char *ptr = static_cast<const char*>(eina_list_data_get(inheritances)); - std::string parent = safe_lower(safe_str(ptr)); + const char *ptr = static_cast<const char*> + (eina_list_data_get(inheritances)); + std::string parent = class_format_cxx(safe_lower(ptr)); + // "eo_base" is the Eolian name for EO_BASE_CLASS. cls.parent = - (parent == "eo_base" || parent == "eo.base" || parent == "") + (parent == "eo_base" || parent == "eo::base" || parent == "") ? "efl::eo::base" : parent; } @@ -237,8 +239,8 @@ convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass) if (impl_type == EOLIAN_CTOR) { efl::eolian::eo_constructor constructor; - std::string parent = safe_lower(safe_str(eolian_class_full_name_get(impl_class))); - if(parent == "eo_base" || parent == "eo.base") parent = "eo"; // XXX remove eo_base + std::string parent = safe_lower(eolian_class_full_name_get(impl_class)); + if (parent == "eo_base" || parent == "eo.base") parent = "eo"; constructor.name = parent + "_" + function_name(impl_func); constructor.params = convert_eolian_parameters(impl_func); constructor.comment = convert_comments_function(impl_func, eolian_cxx::ctor); |