From 1a76690abfbe5c709695ff84aa90b51242f4e469 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Wed, 27 Aug 2014 15:25:13 +0100 Subject: [PATCH] eolian/generator: remove support for custom constructors --- src/bin/eolian/eo_generator.c | 18 +-------------- src/bin/eolian/impl_generator.c | 17 -------------- src/tests/eolian/data/object_impl_add_ref.c | 25 ++++++++++----------- 3 files changed, 13 insertions(+), 47 deletions(-) diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index ce498fa519..f3ee216d2b 100644 --- a/src/bin/eolian/eo_generator.c +++ b/src/bin/eolian/eo_generator.c @@ -225,7 +225,7 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func Eina_Bool eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf) { - const Eolian_Function_Type ftype_order[] = {EOLIAN_CTOR, EOLIAN_PROPERTY, EOLIAN_METHOD}; + const Eolian_Function_Type ftype_order[] = {EOLIAN_PROPERTY, EOLIAN_METHOD}; Eina_Iterator *itr; Eolian_Event *event; Eolian_Function *fid; @@ -710,22 +710,6 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf) } eina_iterator_free(itr); - //Constructors - itr = eolian_class_functions_get(class, EOLIAN_CTOR); - EINA_ITERATOR_FOREACH(itr, fn) - { - if (eolian_function_is_legacy_only(fn, EOLIAN_CTOR)) - continue; - - char *desc = _source_desc_get(eolian_function_description_get(fn, EOLIAN_METHOD)); - eo_op_desc_generate(class, fn, EOLIAN_CTOR, desc, tmpbuf); - eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); - free(desc); - - eo_bind_func_generate(class, fn, EOLIAN_UNRESOLVED, str_bodyf, NULL); - } - eina_iterator_free(itr); - //Properties itr = eolian_class_functions_get(class, EOLIAN_PROPERTY); EINA_ITERATOR_FOREACH(itr, fn) diff --git a/src/bin/eolian/impl_generator.c b/src/bin/eolian/impl_generator.c index 069797e443..e0241990d6 100644 --- a/src/bin/eolian/impl_generator.c +++ b/src/bin/eolian/impl_generator.c @@ -162,15 +162,6 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina if (eina_strbuf_length_get(params)) eina_strbuf_prepend_printf(params, ", "); - if (impl_desc && ftype == EOLIAN_CTOR) - { - eina_strbuf_append_printf(super_invok, - " eo_do_super(obj, %s_%s, %s_%s(%s));\n", - class_env.upper_eo_prefix, class_env.upper_classtype, - impl_env.lower_eo_prefix, eolian_function_name_get(foo), - eina_strbuf_string_get(short_params)); - } - fname = eolian_function_name_get(foo); if (fname) { @@ -281,14 +272,6 @@ impl_source_generate(const Eolian_Class *class, Eina_Strbuf *buffer) } eina_iterator_free(itr); - /* Custom constructors */ - itr = eolian_class_functions_get(class, EOLIAN_CTOR); - EINA_ITERATOR_FOREACH(itr, foo) - { - _prototype_generate(foo, EOLIAN_CTOR, data_type_buf, NULL, buffer); - } - eina_iterator_free(itr); - itr = eolian_class_implements_get(class); if (itr) { diff --git a/src/tests/eolian/data/object_impl_add_ref.c b/src/tests/eolian/data/object_impl_add_ref.c index b1e4c354c1..77cabe3f27 100644 --- a/src/tests/eolian/data/object_impl_add_ref.c +++ b/src/tests/eolian/data/object_impl_add_ref.c @@ -25,6 +25,18 @@ _object_impl_b_set(Eo *obj, Object_Impl_Data *pd, Eina_List *value) } +EOLIAN static void +_object_impl_constructor_1(Eo *obj, Object_Impl_Data *pd, int a, char b) +{ + +} + +EOLIAN static void +_object_impl_constructor_2(Eo *obj, Object_Impl_Data *pd) +{ + +} + EOLIAN static char * _object_impl_foo1(Eo *obj, Object_Impl_Data *pd, int a, char *b, double *c) { @@ -37,22 +49,9 @@ _object_impl_foo2(const Eo *obj, Object_Impl_Data *pd, int a, const char *b) } -EOLIAN static void -_object_impl_constructor_1(Eo *obj, Object_Impl_Data *pd, int a, char b) -{ - -} - -EOLIAN static void -_object_impl_constructor_2(Eo *obj, Object_Impl_Data *pd) -{ - -} - EOLIAN static void _object_impl_base_constructor(Eo *obj, Object_Impl_Data *pd) { - eo_do_super(obj, OBJECT_IMPL_CLASS, base_constructor()); }