diff options
author | tasn <tasn> | 2012-06-27 03:58:45 +0000 |
---|---|---|
committer | tasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2012-06-27 03:58:45 +0000 |
commit | 5dcf131e399f46b0040379bc55d0363b58cf3995 (patch) | |
tree | 2e3248f07098dc33692bafda0967af96ebfe45f2 /src | |
parent | e87e099e05a80164e153ea4b28b6f2835c04dec2 (diff) | |
download | eobj-5dcf131e399f46b0040379bc55d0363b58cf3995.tar.gz eobj-5dcf131e399f46b0040379bc55d0363b58cf3995.tar.bz2 eobj-5dcf131e399f46b0040379bc55d0363b58cf3995.zip |
Eo: Removed the const op concept.
Too ambiguous to be worth it...
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@72914 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
Diffstat (limited to 'src')
27 files changed, 102 insertions, 172 deletions
diff --git a/src/examples/eo_isa/interface.c b/src/examples/eo_isa/interface.c index 763316a..52ef1d3 100644 --- a/src/examples/eo_isa/interface.c +++ b/src/examples/eo_isa/interface.c @@ -8,7 +8,7 @@ EAPI Eo_Op INTERFACE_BASE_ID = 0; #define MY_CLASS INTERFACE_CLASS static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), + EO_OP_DESCRIPTION(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/eo_isa/mixin.c b/src/examples/eo_isa/mixin.c index df89fce..cd3cfb5 100644 --- a/src/examples/eo_isa/mixin.c +++ b/src/examples/eo_isa/mixin.c @@ -9,10 +9,10 @@ EAPI Eo_Op MIXIN_BASE_ID = 0; #define MY_CLASS MIXIN_CLASS static void -_a_square_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_a_square_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a; - eo_query(obj, simple_a_get(&a)); + eo_do(obj, simple_a_get(&a)); int *ret = va_arg(*list, int *); if (ret) *ret = a * a; @@ -23,7 +23,7 @@ static void _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), EO_OP_FUNC_SENTINEL }; @@ -32,7 +32,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), + EO_OP_DESCRIPTION(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/eo_isa/simple.c b/src/examples/eo_isa/simple.c index 7a32757..6bf3fbf 100644 --- a/src/examples/eo_isa/simple.c +++ b/src/examples/eo_isa/simple.c @@ -13,7 +13,7 @@ typedef struct #define MY_CLASS SIMPLE_CLASS static void -_a_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *a; @@ -33,7 +33,7 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) } static void -_a_power_3_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_power_3_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *ret; @@ -48,8 +48,8 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), - EO_OP_FUNC_CONST(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), EO_OP_FUNC_SENTINEL }; @@ -58,7 +58,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/evas/evas_obj.c b/src/examples/evas/evas_obj.c index 3ce0c82..24bcb75 100644 --- a/src/examples/evas/evas_obj.c +++ b/src/examples/evas/evas_obj.c @@ -47,7 +47,7 @@ _color_set(Eo *obj, void *class_data EINA_UNUSED, va_list *list) } static void -_color_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_color_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { Evas_Object *evas_obj = eo_evas_object_get(obj); int *r, *g, *b, *a; @@ -111,7 +111,7 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_POSITION_SET), _position_set), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_SIZE_SET), _size_set), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_SET), _color_set), - EO_OP_FUNC_CONST(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_GET), _color_get), + EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_GET), _color_get), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_VISIBILITY_SET), _visibility_set), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_CHILD_ADD), _child_add), EO_OP_FUNC_SENTINEL @@ -124,7 +124,7 @@ static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_POSITION_SET, "Position of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_SIZE_SET, "Size of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_COLOR_SET, "Color of an evas object."), - EO_OP_DESCRIPTION_CONST(EXEVAS_OBJ_SUB_ID_COLOR_GET, "Color of an evas object."), + EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_COLOR_GET, "Color of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_VISIBILITY_SET, "Visibility of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_CHILD_ADD, "Add a child eo."), EO_OP_DESCRIPTION_SENTINEL diff --git a/src/examples/evas/evas_obj.h b/src/examples/evas/evas_obj.h index 24084d5..7aa761c 100644 --- a/src/examples/evas/evas_obj.h +++ b/src/examples/evas/evas_obj.h @@ -76,7 +76,7 @@ static inline Evas_Object * eo_evas_object_get(const Eo *obj) { void *data; - eo_query(obj, eo_base_data_get(EXEVAS_OBJ_STR, &data)); + eo_do((Eo *) obj, eo_base_data_get(EXEVAS_OBJ_STR, &data)); return data; } diff --git a/src/examples/simple/interface.c b/src/examples/simple/interface.c index 763316a..52ef1d3 100644 --- a/src/examples/simple/interface.c +++ b/src/examples/simple/interface.c @@ -8,7 +8,7 @@ EAPI Eo_Op INTERFACE_BASE_ID = 0; #define MY_CLASS INTERFACE_CLASS static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), + EO_OP_DESCRIPTION(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/simple/mixin.c b/src/examples/simple/mixin.c index df89fce..cd3cfb5 100644 --- a/src/examples/simple/mixin.c +++ b/src/examples/simple/mixin.c @@ -9,10 +9,10 @@ EAPI Eo_Op MIXIN_BASE_ID = 0; #define MY_CLASS MIXIN_CLASS static void -_a_square_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_a_square_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a; - eo_query(obj, simple_a_get(&a)); + eo_do(obj, simple_a_get(&a)); int *ret = va_arg(*list, int *); if (ret) *ret = a * a; @@ -23,7 +23,7 @@ static void _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), EO_OP_FUNC_SENTINEL }; @@ -32,7 +32,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), + EO_OP_DESCRIPTION(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/simple/simple.c b/src/examples/simple/simple.c index 7a32757..6bf3fbf 100644 --- a/src/examples/simple/simple.c +++ b/src/examples/simple/simple.c @@ -13,7 +13,7 @@ typedef struct #define MY_CLASS SIMPLE_CLASS static void -_a_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *a; @@ -33,7 +33,7 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) } static void -_a_power_3_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_power_3_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *ret; @@ -48,8 +48,8 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), - EO_OP_FUNC_CONST(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), EO_OP_FUNC_SENTINEL }; @@ -58,7 +58,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/lib/Eo.h b/src/lib/Eo.h index e1a0b82..b1d00d0 100644 --- a/src/lib/Eo.h +++ b/src/lib/Eo.h @@ -67,7 +67,6 @@ enum _Eo_Op_Type { EO_OP_TYPE_INVALID = -1, /**< Invalid op. */ EO_OP_TYPE_REGULAR = 0, /**< Regular op. */ - EO_OP_TYPE_CONST, /**< Const op - object should not change. */ EO_OP_TYPE_CLASS, /**< Class op - a class op. Like static in Java/C++. */ }; @@ -137,21 +136,11 @@ typedef size_t Eo_Class_Id; * The type of the Op functions. This is the type of the functions used by * Eo. * - * @see eo_op_func_type_const + * @see eo_op_func_type_class */ typedef void (*eo_op_func_type)(Eo *, void *class_data, va_list *list); /** - * @typedef eo_op_func_type_const - * The type of the const Op functions. This is the type of the functions used - * by Eo. This is the same as #eo_op_func_type, except that this should - * be used with functions that don't modify the data. - * - * @see eo_op_func_type - */ -typedef void (*eo_op_func_type_const)(const Eo *, const void *class_data, va_list *list); - -/** * @typedef eo_op_func_type_class * The type of the class Op functions. This is the same as #eo_op_func_type,\ * exepct that it's for usage with class functions, and not with object @@ -303,22 +292,10 @@ typedef struct _Eo_Op_Func_Description Eo_Op_Func_Description; * @def EO_OP_FUNC(op, func) * A convenience macro to be used when populating the #Eo_Op_Func_Description * array. - * - * @see EO_OP_FUNC_CONST */ #define EO_OP_FUNC(op, func) { op, EO_TYPECHECK(eo_op_func_type, func), EO_OP_TYPE_REGULAR } /** - * @def EO_OP_FUNC_CONST(op, func) - * A convenience macro to be used when populating the #Eo_Op_Func_Description - * array. - * The same as #EO_OP_FUNC but for const functions. - * - * @see EO_OP_FUNC - */ -#define EO_OP_FUNC_CONST(op, func) { op, (eo_op_func_type) EO_TYPECHECK(eo_op_func_type_const, func), EO_OP_TYPE_CONST } - -/** * @def EO_OP_FUNC_CLASS(op, func) * A convenience macro to be used when populating the #Eo_Op_Func_Description * array. @@ -396,25 +373,11 @@ typedef struct _Eo_Class_Description Eo_Class_Description; * @param doc Additional doc for the op. * @see Eo_Op_Description * @see EO_OP_DESCRIPTION_CLASS - * @see EO_OP_DESCRIPTION_CONST * @see EO_OP_DESCRIPTION_SENTINEL */ #define EO_OP_DESCRIPTION(sub_id, doc) { sub_id, #sub_id, doc, EO_OP_TYPE_REGULAR } /** - * @def EO_OP_DESCRIPTION_CONST(op, doc) - * An helper macro to help populating #Eo_Op_Description - * This macro is the same as EO_OP_DESCRIPTION but indicates that the op's - * implementation should not change the object. - * @param sub_id The sub id of the op being described. - * @param doc Additional doc for the op. - * @see Eo_Op_Description - * @see EO_OP_DESCRIPTION - * @see EO_OP_DESCRIPTION_SENTINEL - */ -#define EO_OP_DESCRIPTION_CONST(sub_id, doc) { sub_id, #sub_id, doc, EO_OP_TYPE_CONST } - -/** * @def EO_OP_DESCRIPTION_CLASS(op, doc) * An helper macro to help populating #Eo_Op_Description * This macro is the same as EO_OP_DESCRIPTION but indicates that the op's @@ -507,13 +470,6 @@ EAPI Eina_Bool eo_shutdown(void); #define eo_do(obj, ...) eo_do_internal(obj, EO_OP_TYPE_REGULAR, __VA_ARGS__, EO_NOOP) /** - * @def eo_query - * Same as #eo_do but only for const ops. - * @see eo_do - */ -#define eo_query(obj, ...) eo_do_internal((Eo *) EO_TYPECHECK(const Eo *, obj), EO_OP_TYPE_CONST, __VA_ARGS__, EO_NOOP) - -/** * @def eo_class_do * A convenience wrapper around eo_class_do_internal() * @see eo_class_do_internal @@ -553,27 +509,9 @@ EAPI Eina_Bool eo_class_do_internal(const Eo_Class *klass, ...); * @param ... list of parameters. * @return @c EINA_TRUE on success. * - * Unlike eo_do() and eo_query(), this function only accepts one op. - * - * Use the helper macros, don't pass the parameters manually. - * - * Same as eo_do_super() just for const objects. - * - * @see #eo_query - * @see eo_do_super() - */ -#define eo_query_super(obj, ...) eo_do_super_internal((Eo *) EO_TYPECHECK(const Eo *, obj), EO_OP_TYPE_CONST, __VA_ARGS__) - -/** - * @brief Calls the super function for the specific op. - * @param obj The object to work on - * @param ... list of parameters. - * @return @c EINA_TRUE on success. - * - * Unlike eo_do() and eo_query(), this function only accepts one op. + * Unlike eo_do(), this function only accepts one op. * * @see #eo_do - * @see eo_query_super() */ #define eo_do_super(obj, ...) eo_do_super_internal(obj, EO_OP_TYPE_REGULAR, __VA_ARGS__) @@ -601,7 +539,6 @@ EAPI Eina_Bool eo_class_do_internal(const Eo_Class *klass, ...); * * @see #eo_do * @see #eo_do_super - * @see #eo_query_super */ EAPI Eina_Bool eo_do_super_internal(Eo *obj, Eo_Op_Type op_type, Eo_Op op, ...); diff --git a/src/lib/eo.c b/src/lib/eo.c index 75677fb..0509608 100644 --- a/src/lib/eo.c +++ b/src/lib/eo.c @@ -371,12 +371,6 @@ _eo_op_internal(Eo *obj, Eo_Op_Type op_type, Eo_Op op, va_list *p_list) ERR("Tried calling a class op '%s' (%x) from a non-class context.", (op_desc) ? op_desc->name : NULL, op); return EINA_FALSE; } - else if ((op_type == EO_OP_TYPE_CONST) && - (op_desc->op_type != EO_OP_TYPE_CONST)) - { - ERR("Tried calling non-const or non-existant op '%s' (%x) from a const (query) function.", (op_desc) ? op_desc->name : NULL, op); - return EINA_FALSE; - } } #endif diff --git a/src/lib/eo_base_class.c b/src/lib/eo_base_class.c index ffb8858..1aa3aed 100644 --- a/src/lib/eo_base_class.c +++ b/src/lib/eo_base_class.c @@ -73,7 +73,7 @@ _data_set(Eo *obj, void *class_data, va_list *list) } static void -_data_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_data_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { /* We don't really change it... */ Private_Data *pd = (Private_Data *) class_data; @@ -137,7 +137,7 @@ _wref_count(Private_Data *pd) } static void -_wref_add(const Eo *obj, const void *class_data, va_list *list) +_wref_add(Eo *obj, void *class_data, va_list *list) { Private_Data *pd = (Private_Data *) class_data; size_t count; @@ -150,11 +150,11 @@ _wref_add(const Eo *obj, const void *class_data, va_list *list) pd->wrefs[count - 1] = wref; pd->wrefs[count] = NULL; - *wref = (Eo *) obj; + *wref = obj; } static void -_wref_del(const Eo *obj, const void *class_data, va_list *list) +_wref_del(Eo *obj, void *class_data, va_list *list) { Private_Data *pd = (Private_Data *) class_data; size_t count; @@ -345,10 +345,9 @@ _ev_cb_del(Eo *obj, void *class_data, va_list *list) } static void -_ev_cb_call(const Eo *_obj, const void *class_data, va_list *list) +_ev_cb_call(Eo *obj, void *class_data, va_list *list) { Private_Data *pd = (Private_Data *) class_data; - Eo *obj = (Eo *) _obj; const Eo_Event_Description *desc = va_arg(*list, const Eo_Event_Description *); void *event_info = va_arg(*list, void *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); @@ -435,7 +434,7 @@ _ev_thaw(Eo *obj, void *class_data, va_list *list EINA_UNUSED) } static void -_ev_freeze_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_ev_freeze_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { Private_Data *pd = (Private_Data *) class_data; int *ret = va_arg(*list, int *); @@ -512,18 +511,18 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_SET), _data_set), - EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_DATA_GET), _data_get), + EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_GET), _data_get), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_DEL), _data_del), - EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_WREF_ADD), _wref_add), - EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_WREF_DEL), _wref_del), + EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_WREF_ADD), _wref_add), + EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_WREF_DEL), _wref_del), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_PRIORITY_ADD), _ev_cb_priority_add), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_DEL), _ev_cb_del), - EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL), _ev_cb_call), + EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL), _ev_cb_call), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_ADD), _ev_cb_forwarder_add), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_DEL), _ev_cb_forwarder_del), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE), _ev_freeze), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_THAW), _ev_thaw), - EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE_GET), _ev_freeze_get), + EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE_GET), _ev_freeze_get), EO_OP_FUNC_CLASS(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE), _ev_global_freeze), EO_OP_FUNC_CLASS(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_GLOBAL_THAW), _ev_global_thaw), EO_OP_FUNC_CLASS(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE_GET), _ev_global_freeze_get), @@ -537,18 +536,18 @@ static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(EO_BASE_SUB_ID_CONSTRUCTOR, "Constructor"), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DESTRUCTOR, "Destructor"), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_SET, "Set data for key."), - EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_DATA_GET, "Get data for key."), + EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_GET, "Get data for key."), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_DEL, "Del key."), - EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_WREF_ADD, "Add a weak ref to the object."), - EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_WREF_DEL, "Delete the weak ref."), + EO_OP_DESCRIPTION(EO_BASE_SUB_ID_WREF_ADD, "Add a weak ref to the object."), + EO_OP_DESCRIPTION(EO_BASE_SUB_ID_WREF_DEL, "Delete the weak ref."), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_PRIORITY_ADD, "Add an event callback with a priority."), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_DEL, "Delete an event callback"), - EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL, "Call the event callbacks for an event."), + EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL, "Call the event callbacks for an event."), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_ADD, "Add an event forwarder."), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_DEL, "Delete an event forwarder."), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_FREEZE, "Freezes events."), EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_THAW, "Thaws events."), - EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_EVENT_FREEZE_GET, "Get event freeze counter."), + EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_FREEZE_GET, "Get event freeze counter."), EO_OP_DESCRIPTION_CLASS(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE, "Freezes events globally."), EO_OP_DESCRIPTION_CLASS(EO_BASE_SUB_ID_EVENT_GLOBAL_THAW, "Thaws events globally."), EO_OP_DESCRIPTION_CLASS(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE_GET, "Get global event freeze counter."), diff --git a/src/tests/access/inherit.c b/src/tests/access/inherit.c index 2bf8abe..32360e5 100644 --- a/src/tests/access/inherit.c +++ b/src/tests/access/inherit.c @@ -11,7 +11,7 @@ EAPI Eo_Op INHERIT_BASE_ID = 0; #define MY_CLASS INHERIT_CLASS static void -_prot_print(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_prot_print(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { Simple_Protected_Data *pd = eo_data_get(obj, SIMPLE_CLASS); (void) list; @@ -22,7 +22,7 @@ static void _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC_CONST(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print), + EO_OP_FUNC(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print), EO_OP_FUNC_SENTINEL }; @@ -30,7 +30,7 @@ _class_constructor(Eo_Class *klass) } static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(INHERIT_SUB_ID_PROT_PRINT, "Print protected var x1."), + EO_OP_DESCRIPTION(INHERIT_SUB_ID_PROT_PRINT, "Print protected var x1."), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/composite_objects/comp.c b/src/tests/composite_objects/comp.c index ea56934..c126c5b 100644 --- a/src/tests/composite_objects/comp.c +++ b/src/tests/composite_objects/comp.c @@ -11,11 +11,11 @@ EAPI Eo_Op COMP_BASE_ID = 0; #define MY_CLASS COMP_CLASS static void -_a_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_a_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int *a; a = va_arg(*list, int *); - eo_query_super(obj, simple_a_get(a)); + eo_do_super(obj, simple_a_get(a)); } static void @@ -40,7 +40,7 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), EO_OP_FUNC_SENTINEL }; diff --git a/src/tests/composite_objects/simple.c b/src/tests/composite_objects/simple.c index dbb40df..da56b65 100644 --- a/src/tests/composite_objects/simple.c +++ b/src/tests/composite_objects/simple.c @@ -23,7 +23,7 @@ _a_set(Eo *obj, void *class_data, va_list *list) } static void -_a_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Simple_Public_Data *pd = class_data; int *a; @@ -36,7 +36,7 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), EO_OP_FUNC_SENTINEL }; @@ -45,7 +45,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/constructors/mixin.c b/src/tests/constructors/mixin.c index a572f3f..5c8b16f 100644 --- a/src/tests/constructors/mixin.c +++ b/src/tests/constructors/mixin.c @@ -9,10 +9,10 @@ EAPI Eo_Op MIXIN_BASE_ID = 0; #define MY_CLASS MIXIN_CLASS static void -_add_and_print_set(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_add_and_print_set(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a, b, x; - eo_query(obj, simple_a_get(&a), simple_b_get(&b)); + eo_do(obj, simple_a_get(&a), simple_b_get(&b)); x = va_arg(*list, const int); printf("%s %d\n", __func__, a + b + x); } @@ -41,7 +41,7 @@ _class_constructor(Eo_Class *klass) const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set), EO_OP_FUNC_SENTINEL }; @@ -49,7 +49,7 @@ _class_constructor(Eo_Class *klass) } static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_ADD_AND_SET, "Add A + B + param and print it"), + EO_OP_DESCRIPTION(MIXIN_SUB_ID_ADD_AND_SET, "Add A + B + param and print it"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/constructors/simple.c b/src/tests/constructors/simple.c index c1dddb4..789a762 100644 --- a/src/tests/constructors/simple.c +++ b/src/tests/constructors/simple.c @@ -18,7 +18,7 @@ static char *class_var = NULL; #define _GET_SET_FUNC(name) \ static void \ -_##name##_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) \ +_##name##_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) \ { \ const Private_Data *pd = class_data; \ int *name; \ @@ -64,9 +64,9 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get), EO_OP_FUNC_SENTINEL }; @@ -83,9 +83,9 @@ _class_destructor(Eo_Class *klass EINA_UNUSED) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_SET, "Set property B"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "Get property B"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_GET, "Get property B"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/eo_suite/class_simple.c b/src/tests/eo_suite/class_simple.c index 866a336..64e13e0 100644 --- a/src/tests/eo_suite/class_simple.c +++ b/src/tests/eo_suite/class_simple.c @@ -18,7 +18,7 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) } static void -_a_print(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_print(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Simple_Public_Data *pd = class_data; (void) list; @@ -37,7 +37,7 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), _a_print), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), _a_print), EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), _class_hi_print), EO_OP_FUNC_SENTINEL }; @@ -47,7 +47,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_PRINT, "Print property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_PRINT, "Print property A"), EO_OP_DESCRIPTION_CLASS(SIMPLE_SUB_ID_CLASS_HI_PRINT, "Print Hi"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/eo_suite/eo_test_class_errors.c b/src/tests/eo_suite/eo_test_class_errors.c index c7b9c70..77658b0 100644 --- a/src/tests/eo_suite/eo_test_class_errors.c +++ b/src/tests/eo_suite/eo_test_class_errors.c @@ -265,7 +265,7 @@ END_TEST static int _const_ops_counter = 0; static void -_const_ops_a_set(const Eo *obj EINA_UNUSED, const void *class_data EINA_UNUSED, va_list *list) +_const_ops_a_set(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED, va_list *list) { int a = va_arg(*list, int); (void) a; @@ -288,11 +288,11 @@ static void _const_ops_class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), (eo_op_func_type_const) _const_ops_a_set), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), (eo_op_func_type) _const_ops_a_set), EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), (eo_op_func_type) _const_ops_a_print), EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), (eo_op_func_type_class) _const_ops_a_set), EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), (eo_op_func_type_class) _const_ops_a_print), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), (eo_op_func_type_const) _const_ops_class_hi_print), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), (eo_op_func_type) _const_ops_class_hi_print), EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), (eo_op_func_type) _const_ops_class_hi_print), EO_OP_FUNC_SENTINEL }; @@ -319,9 +319,9 @@ START_TEST(eo_op_types) klass = eo_class_new(&class_desc, 0, SIMPLE_CLASS, NULL); fail_if(!klass); + /* Add class checks here... */ Eo *obj = eo_add(klass, NULL); eo_do(obj, simple_a_set(7), simple_a_print(), simple_class_hi_print()); - fail_if(_const_ops_counter != 0); eo_unref(obj); diff --git a/src/tests/eo_suite/eo_test_general.c b/src/tests/eo_suite/eo_test_general.c index ef62cac..74379bd 100644 --- a/src/tests/eo_suite/eo_test_general.c +++ b/src/tests/eo_suite/eo_test_general.c @@ -488,8 +488,8 @@ START_TEST(eo_op_errors) obj = eo_add(SIMPLE_CLASS, NULL); fail_if(!eo_do(obj, simple_a_print())); - fail_if(!eo_query(obj, simple_a_print())); - fail_if(eo_query(obj, simple_a_set(1))); + fail_if(!eo_do(obj, simple_a_print())); + fail_if(!eo_do(obj, simple_a_set(1))); eo_unref(obj); eo_shutdown(); diff --git a/src/tests/function_overrides/simple.c b/src/tests/function_overrides/simple.c index 328736e..db9660e 100644 --- a/src/tests/function_overrides/simple.c +++ b/src/tests/function_overrides/simple.c @@ -19,7 +19,7 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) } static void -_a_print(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_print(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Simple_Public_Data *pd = class_data; (void) list; @@ -47,7 +47,7 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), _a_print), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), _a_print), EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_PRINT), _class_print), EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_PRINT2), _class_print2), EO_OP_FUNC_SENTINEL @@ -58,7 +58,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_PRINT, "Print property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_PRINT, "Print property A"), EO_OP_DESCRIPTION_CLASS(SIMPLE_SUB_ID_CLASS_PRINT, "Print class name."), EO_OP_DESCRIPTION_CLASS(SIMPLE_SUB_ID_CLASS_PRINT2, "Print2 class name."), EO_OP_DESCRIPTION_SENTINEL diff --git a/src/tests/interface/interface.c b/src/tests/interface/interface.c index 8015e63..42ad7b5 100644 --- a/src/tests/interface/interface.c +++ b/src/tests/interface/interface.c @@ -9,7 +9,7 @@ EAPI Eo_Op INTERFACE_BASE_ID = 0; #define MY_CLASS INTERFACE_CLASS static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(INTERFACE_SUB_ID_AB_SUM_GET, "Get the sum of a and b."), + EO_OP_DESCRIPTION(INTERFACE_SUB_ID_AB_SUM_GET, "Get the sum of a and b."), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/interface/interface2.c b/src/tests/interface/interface2.c index 0f60bbc..59c4ff8 100644 --- a/src/tests/interface/interface2.c +++ b/src/tests/interface/interface2.c @@ -10,7 +10,7 @@ EAPI Eo_Op INTERFACE2_BASE_ID = 0; #define MY_CLASS INTERFACE2_CLASS static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(INTERFACE2_SUB_ID_AB_SUM_GET2, "Print the sum of a and b."), + EO_OP_DESCRIPTION(INTERFACE2_SUB_ID_AB_SUM_GET2, "Print the sum of a and b."), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/interface/simple.c b/src/tests/interface/simple.c index b72ed76..748aa0b 100644 --- a/src/tests/interface/simple.c +++ b/src/tests/interface/simple.c @@ -17,7 +17,7 @@ typedef struct #define _GET_SET_FUNC(name) \ static void \ -_##name##_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) \ +_##name##_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) \ { \ const Private_Data *pd = class_data; \ int *name; \ @@ -39,10 +39,10 @@ _GET_SET_FUNC(a) _GET_SET_FUNC(b) static void -_ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_ab_sum_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a, b; - eo_query(obj, simple_a_get(&a), simple_b_get(&b)); + eo_do(obj, simple_a_get(&a), simple_b_get(&b)); int *sum = va_arg(*list, int *); if (sum) *sum = a + b; @@ -50,10 +50,10 @@ _ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) } static void -_ab_sum_get2(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_ab_sum_get2(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a, b; - eo_query(obj, simple_a_get(&a), simple_b_get(&b)); + eo_do(obj, simple_a_get(&a), simple_b_get(&b)); int *sum = va_arg(*list, int *); if (sum) *sum = a + b + 1; @@ -65,11 +65,11 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get), - EO_OP_FUNC_CONST(INTERFACE_ID(INTERFACE_SUB_ID_AB_SUM_GET), _ab_sum_get), - EO_OP_FUNC_CONST(INTERFACE2_ID(INTERFACE2_SUB_ID_AB_SUM_GET2), _ab_sum_get2), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get), + EO_OP_FUNC(INTERFACE_ID(INTERFACE_SUB_ID_AB_SUM_GET), _ab_sum_get), + EO_OP_FUNC(INTERFACE2_ID(INTERFACE2_SUB_ID_AB_SUM_GET2), _ab_sum_get2), EO_OP_FUNC_SENTINEL }; @@ -78,9 +78,9 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_SET, "Set property B"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "Get property B"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_GET, "Get property B"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/mixin/mixin.c b/src/tests/mixin/mixin.c index e643d2a..4aa2007 100644 --- a/src/tests/mixin/mixin.c +++ b/src/tests/mixin/mixin.c @@ -9,10 +9,10 @@ EAPI Eo_Op MIXIN_BASE_ID = 0; #define MY_CLASS MIXIN_CLASS static void -_ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_ab_sum_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a, b; - eo_query(obj, simple_a_get(&a), simple_b_get(&b)); + eo_do(obj, simple_a_get(&a), simple_b_get(&b)); int *sum = va_arg(*list, int *); if (sum) *sum = a + b; @@ -37,7 +37,7 @@ _class_constructor(Eo_Class *klass) const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), EO_OP_FUNC_SENTINEL }; @@ -46,7 +46,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_AB_SUM_GET, "Get the sum of a and b."), + EO_OP_DESCRIPTION(MIXIN_SUB_ID_AB_SUM_GET, "Get the sum of a and b."), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/tests/mixin/mixin2.c b/src/tests/mixin/mixin2.c index f47c438..c5ad62d 100644 --- a/src/tests/mixin/mixin2.c +++ b/src/tests/mixin/mixin2.c @@ -10,20 +10,20 @@ #define MY_CLASS MIXIN2_CLASS static void -_ab_sum_get(const Eo *obj, const void *class_data, va_list *list) +_ab_sum_get(Eo *obj, void *class_data, va_list *list) { /* This cast is a hack just for the tests... */ Mixin2_Public_Data *pd = (Mixin2_Public_Data *) class_data; int *sum = va_arg(*list, int *); printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); - eo_query_super(obj, mixin_ab_sum_get(sum)); + eo_do_super(obj, mixin_ab_sum_get(sum)); ++*sum; pd->count += 2; { int _a, _b; - eo_query(obj, simple_a_get(&_a), simple_b_get(&_b)); + eo_do(obj, simple_a_get(&_a), simple_b_get(&_b)); fail_if(*sum != _a + _b + 1); } } @@ -46,7 +46,7 @@ _class_constructor(Eo_Class *klass) const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), EO_OP_FUNC_SENTINEL }; diff --git a/src/tests/mixin/mixin3.c b/src/tests/mixin/mixin3.c index 46a3d7c..5560274 100644 --- a/src/tests/mixin/mixin3.c +++ b/src/tests/mixin/mixin3.c @@ -10,20 +10,20 @@ #define MY_CLASS MIXIN3_CLASS static void -_ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_ab_sum_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { /* This cast is just a hack for the test. */ Mixin3_Public_Data *pd = (Mixin3_Public_Data *) class_data; int *sum = va_arg(*list, int *); printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); - eo_query_super(obj, mixin_ab_sum_get(sum)); + eo_do_super(obj, mixin_ab_sum_get(sum)); ++*sum; pd->count += 3; { int _a, _b; - eo_query(obj, simple_a_get(&_a), simple_b_get(&_b)); + eo_do(obj, simple_a_get(&_a), simple_b_get(&_b)); fail_if(*sum != _a + _b + 2); } } @@ -46,7 +46,7 @@ _class_constructor(Eo_Class *klass) const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), EO_OP_FUNC_SENTINEL }; diff --git a/src/tests/mixin/simple.c b/src/tests/mixin/simple.c index c0c3b79..3c2412e 100644 --- a/src/tests/mixin/simple.c +++ b/src/tests/mixin/simple.c @@ -18,7 +18,7 @@ typedef struct #define _GET_SET_FUNC(name) \ static void \ -_##name##_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) \ +_##name##_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) \ { \ const Private_Data *pd = class_data; \ int *name; \ @@ -44,9 +44,9 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get), EO_OP_FUNC_SENTINEL }; @@ -55,9 +55,9 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_SET, "Set property B"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "Get property B"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_GET, "Get property B"), EO_OP_DESCRIPTION_SENTINEL }; |