aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-03-02 23:58:20 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-02 23:58:20 +0100
commit6f092071ac54d10dde39889571518e4b9d17308f (patch)
tree15e01d90e647415e9d64d6a9e8eb44f7989802be
parentelua: add missing APIs to eolian bindings (diff)
downloadefl-6f092071ac54d10dde39889571518e4b9d17308f.tar.gz
eolian cxx,csharp: Update after eolian changes
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc4
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/type_impl.hh2
-rw-r--r--src/bin/eolian_mono/eolian_mono.cc8
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp2
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_documentation.cc6
6 files changed, 12 insertions, 12 deletions
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 02a6fd7192..eaaec797ae 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -279,7 +279,7 @@ run(options_type const& opts)
char* base = basename(dup);
std::string cpp_types_header;
opts.unit = (Eolian_Unit*)opts.state;
- klass = ::eolian_class_get_by_file(opts.unit, base);
+ klass = ::eolian_state_class_by_file_get(opts.state, base);
free(dup);
if (klass)
{
@@ -317,7 +317,7 @@ run(options_type const& opts)
}
char* dup = strdup(name.c_str());
char* base = basename(dup);
- Eolian_Class const* klass = ::eolian_class_get_by_file(unit, base);
+ Eolian_Class const* klass = ::eolian_state_class_by_file_get(opts.state, base);
free(dup);
if (klass)
{
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh
index 834ca1248d..d836124fe0 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -1277,7 +1277,7 @@ struct native_convert_function_pointer_generator
// Getting the type through C api
std::string type_name = param.type.original_type.visit(type_name_visitor{});
- const Eolian_Typedecl *tpd = ::eolian_typedecl_alias_get_by_name(param.unit, type_name.c_str());
+ const Eolian_Typedecl *tpd = ::eolian_unit_alias_by_name_get(param.unit, type_name.c_str());
if (!tpd)
{
EINA_LOG_ERR("Failed to get typedecl for c type [%s]", param.type.c_type.c_str());
diff --git a/src/bin/eolian_mono/eolian/mono/type_impl.hh b/src/bin/eolian_mono/eolian/mono/type_impl.hh
index 9b56805b99..dac1ea152e 100644
--- a/src/bin/eolian_mono/eolian/mono/type_impl.hh
+++ b/src/bin/eolian_mono/eolian/mono/type_impl.hh
@@ -229,7 +229,7 @@ struct visitor_generate
// else
// return false;
// }
- // else if(Eolian_Typedecl const* typedecl = eolian_typedecl_struct_get_by_name(c_type.c_str()))
+ // else if(Eolian_Typedecl const* typedecl = eolian_state_struct_by_name_get(c_type.c_str()))
// {
// return as_generator
// (
diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc
index e2b0355530..f7f2781a6b 100644
--- a/src/bin/eolian_mono/eolian_mono.cc
+++ b/src/bin/eolian_mono/eolian_mono.cc
@@ -99,8 +99,8 @@ run(options_type const& opts)
const Eolian_Typedecl *tp = NULL;
char* dup = strdup(opts.in_file.c_str());
std::string basename_input = basename(dup);
- klass = ::eolian_class_get_by_file(opts.unit, basename_input.c_str());
- aliases= ::eolian_typedecl_aliases_get_by_file(opts.unit, basename_input.c_str());
+ klass = ::eolian_state_class_by_file_get(opts.state, basename_input.c_str());
+ aliases= ::eolian_state_aliases_by_file_get(opts.state, basename_input.c_str());
free(dup);
std::string class_file_name = opts.out_file;
@@ -169,7 +169,7 @@ run(options_type const& opts)
}
//else
{
- for (efl::eina::iterator<const Eolian_Typedecl> enum_iterator( ::eolian_typedecl_enums_get_by_file(opts.unit, basename_input.c_str()))
+ for (efl::eina::iterator<const Eolian_Typedecl> enum_iterator( ::eolian_state_enums_by_file_get(opts.state, basename_input.c_str()))
, enum_last; enum_iterator != enum_last; ++enum_iterator)
{
efl::eolian::grammar::attributes::enum_def enum_(&*enum_iterator, opts.unit);
@@ -179,7 +179,7 @@ run(options_type const& opts)
}
}
- for (efl::eina::iterator<const Eolian_Typedecl> struct_iterator( ::eolian_typedecl_structs_get_by_file(opts.unit, basename_input.c_str()))
+ for (efl::eina::iterator<const Eolian_Typedecl> struct_iterator( ::eolian_state_structs_by_file_get(opts.state, basename_input.c_str()))
, struct_last; struct_iterator != struct_last; ++struct_iterator)
{
efl::eolian::grammar::attributes::struct_def struct_(&*struct_iterator, opts.unit);
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 610a844ee1..3ffdbe4101 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -1170,7 +1170,7 @@ inline Eolian_Class const* get_klass(klass_name const& klass_name_, Eolian_Unit
, context_null{}))
return nullptr;
else
- return ::eolian_class_get_by_name(unit, klass_name.c_str());
+ return ::eolian_unit_class_by_name_get(unit, klass_name.c_str());
}
inline std::vector<std::string> cpp_namespaces(std::vector<std::string> namespaces)
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
index 4ec7dfe56e..8acca1001c 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc
@@ -26,7 +26,7 @@ klass_def init_test_data(efl::eolian::eolian_state const& state)
ck_assert(::eolian_state_all_eot_files_parse(state.value));
ck_assert(::eolian_state_file_parse(state.value, PACKAGE_DATA_DIR"/docs.eo"));
- const Eolian_Class *c_klass = ::eolian_class_get_by_name(state.as_unit(), "Docs");
+ const Eolian_Class *c_klass = ::eolian_state_class_by_name_get(state.value, "Docs");
ck_assert_ptr_ne(c_klass, NULL);
klass_def klass(c_klass, state.as_unit());
@@ -172,7 +172,7 @@ START_TEST(eolian_cxx_test_enum_docs)
klass_def klass = init_test_data(eolian_state);
auto unit = eolian_state.as_unit();
- enum_def _enum(::eolian_typedecl_enum_get_by_name(unit, "Bar"), unit);
+ enum_def _enum(::eolian_state_enum_by_name_get(eolian_state.value, "Bar"), unit);
documentation_def doc = _enum.documentation;
ck_assert_str_eq(doc.summary.c_str(), "Docs for enum Bar.");
@@ -215,7 +215,7 @@ START_TEST(eolian_cxx_test_struct_docs)
klass_def klass = init_test_data(eolian_state);
auto unit = eolian_state.as_unit();
- struct_def _struct(::eolian_typedecl_struct_get_by_name(unit, "Foo"), unit);
+ struct_def _struct(::eolian_state_struct_by_name_get(eolian_state.value, "Foo"), unit);
documentation_def doc = _struct.documentation;
ck_assert_str_eq(doc.summary.c_str(), "This is struct Foo. "