From 6cacef250391aea0a62cb888df90679ebb64cd53 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 12 May 2016 14:33:40 +0100 Subject: [PATCH] Eo abstract class: Rename to Eo.Class. --- src/Makefile_Eo.am | 2 +- src/Makefile_Eo_Cxx.am | 4 ++-- src/lib/ector/ector_surface.eo | 2 +- src/lib/eo/Eo.h | 3 ++- src/lib/eo/Makefile.am | 2 +- src/lib/eo/eo.c | 4 ++-- src/lib/eo/eo_abstract_class.eo | 4 ---- src/lib/eo/eo_class.eo | 4 ++++ src/lib/eo/eo_class_class.c | 2 +- src/tests/eo/suite/eo_test_general.c | 2 +- 10 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 src/lib/eo/eo_abstract_class.eo create mode 100644 src/lib/eo/eo_class.eo diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am index 1264b36..2626f3f 100644 --- a/src/Makefile_Eo.am +++ b/src/Makefile_Eo.am @@ -3,7 +3,7 @@ eo_eolian_files = \ lib/eo/eo_base.eo \ - lib/eo/eo_abstract_class.eo \ + lib/eo/eo_class.eo \ lib/eo/eo_interface.eo eo_eolian_c = $(eo_eolian_files:%.eo=%.eo.c) diff --git a/src/Makefile_Eo_Cxx.am b/src/Makefile_Eo_Cxx.am index a3c898d..8153058 100644 --- a/src/Makefile_Eo_Cxx.am +++ b/src/Makefile_Eo_Cxx.am @@ -4,8 +4,8 @@ generated_eo_cxx_bindings = \ lib/eo/eo_base.eo.hh \ lib/eo/eo_base.eo.impl.hh \ -lib/eo/eo_abstract_class.eo.hh \ -lib/eo/eo_abstract_class.eo.impl.hh +lib/eo/eo_class.eo.hh \ +lib/eo/eo_class.eo.impl.hh ### Library diff --git a/src/lib/ector/ector_surface.eo b/src/lib/ector/ector_surface.eo index 92eb68d..aea7357 100644 --- a/src/lib/ector/ector_surface.eo +++ b/src/lib/ector/ector_surface.eo @@ -19,7 +19,7 @@ mixin Ector.Surface (Ector.Buffer) [[Create a new renderer factory for the given type]] return: Eo.Base *; /* FIXME: Should be a more restricted type, only here for cyclic. */ params { - @in type: const(Eo.Abstract_Class) * @nonull; /* FIXME: Should probably be a more restricted type */ + @in type: const(Eo.Class) * @nonull; /* FIXME: Should probably be a more restricted type */ } } } diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 6152d4f..c46d231 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -117,6 +117,7 @@ typedef struct _Eo_Opaque Eo; * The basic class type - should be removed, just for compat. */ typedef Eo Eo_Class; +#define _EO_CLASS_EO_CLASS_TYPE /** * @var _eo_class_creation_lock @@ -935,7 +936,7 @@ EAPI Eina_Bool eo_destructed_is(const Eo *obj); * @{ */ -#include "eo_abstract_class.eo.h" +#include "eo_class.eo.h" /** * @} diff --git a/src/lib/eo/Makefile.am b/src/lib/eo/Makefile.am index c86764b..351576f 100644 --- a/src/lib/eo/Makefile.am +++ b/src/lib/eo/Makefile.am @@ -5,7 +5,7 @@ include ../../Makefile_Eolian_Subbuild_Helper.am ### Library eo_eolian_files = \ eo_base.eo \ - eo_abstract_class.eo \ + eo_class.eo \ eo_interface.eo eo_eolian_c = $(eo_eolian_files:%.eo=%.eo.c) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 7d707a4..bac6c3a 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -760,7 +760,7 @@ eo_class_get(const Eo *eo_id) if (_eo_is_a_class(eo_id)) { EO_CLASS_POINTER_RETURN_VAL(eo_id, _klass, NULL); - return EO_ABSTRACT_CLASS_CLASS; + return EO_CLASS_CLASS; } EO_OBJ_POINTER_RETURN_VAL(eo_id, obj, NULL); @@ -1649,7 +1649,7 @@ eo_init(void) EINA_LOG_STATE_INIT); /* bootstrap EO_CLASS_CLASS */ - (void) EO_ABSTRACT_CLASS_CLASS; + (void) EO_CLASS_CLASS; return EINA_TRUE; } diff --git a/src/lib/eo/eo_abstract_class.eo b/src/lib/eo/eo_abstract_class.eo deleted file mode 100644 index 86b2f7f..0000000 --- a/src/lib/eo/eo_abstract_class.eo +++ /dev/null @@ -1,4 +0,0 @@ -abstract Eo.Abstract_Class () -{ - data: null; -} diff --git a/src/lib/eo/eo_class.eo b/src/lib/eo/eo_class.eo new file mode 100644 index 0000000..4e37f34 --- /dev/null +++ b/src/lib/eo/eo_class.eo @@ -0,0 +1,4 @@ +abstract Eo.Class () +{ + data: null; +} diff --git a/src/lib/eo/eo_class_class.c b/src/lib/eo/eo_class_class.c index d356755..7c5ca65 100644 --- a/src/lib/eo/eo_class_class.c +++ b/src/lib/eo/eo_class_class.c @@ -4,5 +4,5 @@ #include "Eo.h" -#include "eo_abstract_class.eo.c" +#include "eo_class.eo.c" diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index 6578864..014546e 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -730,7 +730,7 @@ START_TEST(eo_magic_checks) fail_if(eo_class_get((Eo *) buf)); fail_if(eo_class_name_get((Eo_Class*) buf)); fail_if(eo_class_get(obj) != SIMPLE_CLASS); - fail_if(eo_class_get(SIMPLE_CLASS) != EO_ABSTRACT_CLASS_CLASS); + fail_if(eo_class_get(SIMPLE_CLASS) != EO_CLASS_CLASS); simple_a_set((Eo_Class *) buf, 1); simple_a_set(eo_super((Eo_Class *) buf, SIMPLE_CLASS), ++i); simple_a_set(eo_super(SIMPLE_CLASS, (Eo_Class *) buf), ++i); -- 2.7.4