On 12/10/13 23:00, Jérémy Zurcher wrote: > jeyzu pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=1648b67c5b1fc7108e13904d4884c50cb9cf7c44 > > commit 1648b67c5b1fc7108e13904d4884c50cb9cf7c44 > Author: Jérémy Zurcher <jer...@asynk.ch> > Date: Sat Oct 12 23:51:59 2013 +0200 > > eo: add EO_CLASS_CLASS > > it's an empty class without operations, > used as a return value for eo_class_get() when the caller is a class > --- > src/Makefile_Eo.am | 1 + > src/lib/eo/Eo.h | 30 ++++++++++++++++++++++++++++++ > src/lib/eo/eo.c | 5 ++++- > src/lib/eo/eo_class_class.c | 20 ++++++++++++++++++++ > 4 files changed, 55 insertions(+), 1 deletion(-) > > diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am > index ab24350..b0d15bd 100644 > --- a/src/Makefile_Eo.am > +++ b/src/Makefile_Eo.am > @@ -10,6 +10,7 @@ lib_eo_libeo_la_SOURCES = \ > lib/eo/eo.c \ > lib/eo/eo_ptr_indirection.c \ > lib/eo/eo_ptr_indirection.h \ > +lib/eo/eo_class_class.c \ > lib/eo/eo_base_class.c \ > lib/eo/eo_private.h > > diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h > index fb7ccc2..36a7948 100644 > --- a/src/lib/eo/Eo.h > +++ b/src/lib/eo/Eo.h > @@ -970,6 +970,36 @@ EAPI Eina_Bool eo_composite_is(const Eo *comp_obj); > */ > > /** > + * @addtogroup Eo_Class_Class Eo's Class class. > + * @{ > + */ > + > +/** > + * @def EO_CLASS_CLASS > + * The class type for the Eo Class class. > + */ > +#define EO_CLASS_CLASS eo_class_class_get() > +/** > + * @brief Use #EO_CLASS_CLASS > + * @internal > + * */ > +EAPI const Eo_Class *eo_class_class_get(void); > + > +/** > + * @var EO_CLASS_CLASS_BASE_ID > + * #EO_CLASS_CLASS 's base id. > + */ > +extern EAPI Eo_Op EO_CLASS_CLASS_BASE_ID; > + > +enum { > + EO_CLASS_CLASS_SUB_ID_LAST > +}; > + > +/** > + * @} > + */ > + > +/** > * @addtogroup Eo_Class_Base Eo's Base class. > * @{ > */ > diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c > index 3e1d3c1..bc4cd8a 100644 > --- a/src/lib/eo/eo.c > +++ b/src/lib/eo/eo.c > @@ -460,7 +460,7 @@ eo_class_get(const Eo *obj_id) > if (_eo_is_a_class(obj_id)) > { > EO_CLASS_POINTER_RETURN_VAL(obj_id, _klass, NULL); > - return NULL; > + return eo_class_class_get(); > } > > EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL); > @@ -1446,6 +1446,9 @@ eo_init(void) > EINA_LOG_STATE_STOP, > EINA_LOG_STATE_INIT); > > + /* bootstrap EO_CLASS_CLASS */ > + (void) eo_class_class_get(); > + > return EINA_TRUE; > } > > diff --git a/src/lib/eo/eo_class_class.c b/src/lib/eo/eo_class_class.c > new file mode 100644 > index 0000000..f9844c5 > --- /dev/null > +++ b/src/lib/eo/eo_class_class.c > @@ -0,0 +1,20 @@ > +#ifdef HAVE_CONFIG_H > +# include <config.h> > +#endif > + > +#include "Eo.h" > + > +EAPI Eo_Op EO_CLASS_CLASS_BASE_ID = 0; > + > +static const Eo_Class_Description class_desc = { > + EO_VERSION, > + "Eo Abstract Class", > + EO_CLASS_TYPE_REGULAR_NO_INSTANT, > + EO_CLASS_DESCRIPTION_OPS(&EO_CLASS_CLASS_BASE_ID, NULL, > EO_CLASS_CLASS_SUB_ID_LAST), > + NULL, > + 0, > + NULL, > + NULL > +}; > + > +EO_DEFINE_CLASS(eo_class_class_get, &class_desc, NULL, NULL) >
Awesome work. Thanks for doing it. -- Tom. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel