forked from enlightenment/efl
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.
This commit is contained in:
parent
2d3c99d30b
commit
d9594dbc9d
|
@ -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
|
||||
}
|
||||
})
|
||||
|
|
|
@ -2232,16 +2232,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.
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, ';');
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -23,6 +23,5 @@ class Ctor_Dtor extends Base {
|
|||
constructors {
|
||||
.custom_constructor_1;
|
||||
.custom_constructor_2 @optional;
|
||||
.custom_constructor_3 @ctor_param;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue