aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-16 15:27:04 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-16 15:37:04 +0200
commitd9594dbc9d9e2bf6e8e58a570f60c2206df45fb3 (patch)
tree3fa9c28b3c1ff63c65090c0a100d37c7ac80dc2b
parentrelease: Update NEWS and bump version for 1.23.0-beta2 release (diff)
downloadefl-d9594dbc9d9e2bf6e8e58a570f60c2206df45fb3.tar.gz
eolian: drop @ctor_param and the associated APIs
This has been unused for a while, and has been just lingering around the code, so drop it so it doesn't make it into a release.
-rw-r--r--src/bindings/luajit/eolian.lua5
-rw-r--r--src/lib/eolian/Eolian.h10
-rw-r--r--src/lib/eolian/database_constructor_api.c7
-rw-r--r--src/lib/eolian/eo_lexer.h2
-rw-r--r--src/lib/eolian/eo_parser.c12
-rw-r--r--src/lib/eolian/eolian_database.h1
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp5
-rw-r--r--src/tests/eolian/data/ctor_dtor.eo1
-rw-r--r--src/tests/eolian/eolian_parsing.c8
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_binding.cc2
10 files changed, 4 insertions, 49 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index faa39a4315..145f6f8ddf 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -394,7 +394,6 @@ ffi.cdef [[
const Eolian_Class *eolian_constructor_class_get(const Eolian_Constructor *ctor);
const Eolian_Function *eolian_constructor_function_get(const Eolian_Constructor *ctor);
Eina_Bool eolian_constructor_is_optional(const Eolian_Constructor *ctor);
- Eina_Bool eolian_constructor_is_ctor_param(const Eolian_Constructor *ctor);
Eina_Iterator *eolian_class_constructors_get(const Eolian_Class *klass);
Eina_Iterator *eolian_class_events_get(const Eolian_Class *klass);
const Eolian_Type *eolian_event_type_get(const Eolian_Event *event);
@@ -1382,10 +1381,6 @@ ffi.metatype("Eolian_Constructor", {
is_optional = function(self)
return eolian.eolian_constructor_is_optional(self) ~= 0
- end,
-
- is_ctor_param = function(self)
- return eolian.eolian_constructor_is_ctor_param(self) ~= 0
end
}
})
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index c0ec4d6a56..0cb7384772 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2233,16 +2233,6 @@ EAPI const Eolian_Function *eolian_constructor_function_get(const Eolian_Constru
EAPI Eina_Bool eolian_constructor_is_optional(const Eolian_Constructor *ctor);
/*
- * @brief Checks if a constructor is tagged as a constructor parameter.
- *
- * @param[in] ctor the handle of the constructor
- * @return EINA_TRUE if a constructor parameter, EINA_FALSE if not (or if input is NULL).
- *
- * @ingroup Eolian
- */
-EAPI Eina_Bool eolian_constructor_is_ctor_param(const Eolian_Constructor *ctor);
-
-/*
* @brief Get an iterator to the constructing functions defined in a class.
*
* @param[in] klass the class.
diff --git a/src/lib/eolian/database_constructor_api.c b/src/lib/eolian/database_constructor_api.c
index 63b935cc6c..bedf9ab7da 100644
--- a/src/lib/eolian/database_constructor_api.c
+++ b/src/lib/eolian/database_constructor_api.c
@@ -29,10 +29,3 @@ eolian_constructor_is_optional(const Eolian_Constructor *ctor)
EINA_SAFETY_ON_NULL_RETURN_VAL(ctor, EINA_FALSE);
return ctor->is_optional;
}
-
-EAPI Eina_Bool
-eolian_constructor_is_ctor_param(const Eolian_Constructor *ctor)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(ctor, EINA_FALSE);
- return ctor->is_ctor_param;
-}
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index e95258d420..876f1c70bc 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -67,7 +67,7 @@ enum Tokens
KW(function), \
KW(__undefined_type), \
\
- KW(true), KW(false), KW(null), KWAT(ctor_param)
+ KW(true), KW(false), KW(null)
/* "regular" keyword and @ prefixed keyword */
#define KW(x) KW_##x
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 1631082081..f7843b51c5 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1810,16 +1810,12 @@ parse_constructor(Eo_Lexer *ls)
ls->klass->base.name,
ls->t.value.s);
eo_lexer_get(ls);
- while (ls->t.kw == KW_at_optional || ls->t.kw == KW_at_ctor_param)
+ while (ls->t.kw == KW_at_optional)
{
if (ls->t.kw == KW_at_optional)
{
ctor->is_optional = EINA_TRUE;
}
- if (ls->t.kw == KW_at_ctor_param)
- {
- ctor->is_ctor_param = EINA_TRUE;
- }
eo_lexer_get(ls);
}
check_next(ls, ';');
@@ -1841,16 +1837,12 @@ parse_constructor(Eo_Lexer *ls)
if (ls->t.token != '.') break;
eo_lexer_get(ls);
}
- while (ls->t.kw == KW_at_optional || ls->t.kw == KW_at_ctor_param)
+ while (ls->t.kw == KW_at_optional)
{
if (ls->t.kw == KW_at_optional)
{
ctor->is_optional = EINA_TRUE;
}
- if (ls->t.kw == KW_at_ctor_param)
- {
- ctor->is_ctor_param = EINA_TRUE;
- }
eo_lexer_get(ls);
}
check_next(ls, ';');
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 1821642c55..ab49424cad 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -329,7 +329,6 @@ struct _Eolian_Constructor
Eolian_Object base;
const Eolian_Class *klass;
Eina_Bool is_optional: 1;
- Eina_Bool is_ctor_param : 1;
};
struct _Eolian_Event
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 683bb000a4..a3f3f3d7df 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -1196,15 +1196,13 @@ struct constructor_def
klass_name klass;
function_def function;
bool is_optional;
- bool is_ctor_param;
friend inline bool operator==(constructor_def const& lhs, constructor_def const& rhs)
{
return lhs.name == rhs.name
&& lhs.klass == rhs.klass
&& lhs.function == rhs.function
- && lhs.is_optional == rhs.is_optional
- && lhs.is_ctor_param == rhs.is_ctor_param;
+ && lhs.is_optional == rhs.is_optional;
}
friend inline bool operator!=(constructor_def const& lhs, constructor_def const& rhs)
@@ -1216,7 +1214,6 @@ struct constructor_def
: name(::eolian_constructor_name_get(constructor))
, klass(::eolian_constructor_class_get(constructor), {})
, is_optional(::eolian_constructor_is_optional(constructor))
- , is_ctor_param(::eolian_constructor_is_ctor_param(constructor))
{
Eolian_Function const* eo_function = ::eolian_constructor_function_get(constructor);
Eolian_Function_Type eo_func_type = ::eolian_function_type_get(eo_function);
diff --git a/src/tests/eolian/data/ctor_dtor.eo b/src/tests/eolian/data/ctor_dtor.eo
index 256dcc0a4d..71bdcede81 100644
--- a/src/tests/eolian/data/ctor_dtor.eo
+++ b/src/tests/eolian/data/ctor_dtor.eo
@@ -23,6 +23,5 @@ class Ctor_Dtor extends Base {
constructors {
.custom_constructor_1;
.custom_constructor_2 @optional;
- .custom_constructor_3 @ctor_param;
}
}
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index cc9c79bb79..2dd6c7775a 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -313,14 +313,6 @@ EFL_START_TEST(eolian_ctor_dtor)
fail_if(strcmp(eolian_function_name_get(impl_func), "custom_constructor_2"));
fail_if(!eolian_function_is_constructor(impl_func, class));
fail_if(eolian_function_is_constructor(impl_func, base));
- fail_if(!(eina_iterator_next(iter, (void**)&ctor)));
- fail_if(!eolian_constructor_is_ctor_param(ctor));
- fail_if(!(impl_class = eolian_constructor_class_get(ctor)));
- fail_if(!(impl_func = eolian_constructor_function_get(ctor)));
- fail_if(impl_class != class);
- fail_if(strcmp(eolian_function_name_get(impl_func), "custom_constructor_3"));
- fail_if(!eolian_function_is_constructor(impl_func, class));
- fail_if(eolian_function_is_constructor(impl_func, base));
fail_if(eina_iterator_next(iter, &dummy));
eina_iterator_free(iter);
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
index 370619d6a7..ad2d48552d 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
@@ -292,7 +292,6 @@ EFL_START_TEST(eolian_cxx_test_constructors)
auto ctor = constructors[0];
ck_assert_str_eq("Generic.required_ctor_a", ctor.name.c_str());
ck_assert(!ctor.is_optional);
- ck_assert(!ctor.is_ctor_param);
auto function = ctor.function;
ck_assert_str_eq("required_ctor_a", function.name.c_str());
@@ -300,7 +299,6 @@ EFL_START_TEST(eolian_cxx_test_constructors)
ctor = constructors[2];
ck_assert_str_eq("Generic.optional_ctor_a", ctor.name.c_str());
ck_assert(ctor.is_optional);
- ck_assert(!ctor.is_ctor_param);
function = ctor.function;
ck_assert_str_eq("optional_ctor_a", function.name.c_str());