diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am index 6675a46d12..17d44b925b 100644 --- a/src/Makefile_Eo.am +++ b/src/Makefile_Eo.am @@ -13,6 +13,7 @@ lib/eo/eo_ptr_indirection.h \ lib/eo/eo_class_class.c \ lib/eo/eo_base_class.c \ lib/eo/eo2_base_class.c \ +lib/eo/eo2_class_class.c \ lib/eo/eo_private.h lib_eo_libeo_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@ diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 4cf780d662..544cf82628 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -1217,11 +1217,13 @@ EAPI Eina_Bool eo_composite_is(const Eo *comp_obj); * The class type for the Eo Class class. */ #define EO_CLASS_CLASS eo_class_class_get() +#define EO2_CLASS_CLASS eo2_class_class_get() /** * @brief Use #EO_CLASS_CLASS * @internal * */ EAPI const Eo_Class *eo_class_class_get(void); +EAPI const Eo_Class *eo2_class_class_get(void); /** * @var EO_CLASS_CLASS_BASE_ID diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 3e40e0efc2..35b92a260d 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -950,7 +950,10 @@ 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_class_class_get(); + if (_klass->desc->version == EO2_VERSION) + return eo2_class_class_get(); + else + return eo_class_class_get(); } EO_OBJ_POINTER_RETURN_VAL(eo_id, obj, NULL); diff --git a/src/lib/eo/eo2_class_class.c b/src/lib/eo/eo2_class_class.c new file mode 100644 index 0000000000..97f2fccaee --- /dev/null +++ b/src/lib/eo/eo2_class_class.c @@ -0,0 +1,20 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "Eo.h" + +static Eo2_Op_Description op_descs [] = {}; + +static const Eo_Class_Description class_desc = { + EO2_VERSION, + "Eo Abstract Class", + EO_CLASS_TYPE_REGULAR_NO_INSTANT, + EO2_CLASS_DESCRIPTION_OPS(op_descs), + NULL, + 0, + NULL, + NULL +}; + +EO_DEFINE_CLASS(eo2_class_class_get, &class_desc, NULL, NULL)