forked from enlightenment/efl
Eo: Remove EO_SENTINEL.
This was never really needed because we always had the count. Removing this now because we are already breaking API and ABI.
This commit is contained in:
parent
35a482141d
commit
9328524da4
|
@ -18,7 +18,6 @@ EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
|
|||
|
||||
static Eo_Op_Description op_desc[] = {
|
||||
EO_OP_FUNC(simple_a_set, _a_set, "Set property A"),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -11,7 +11,6 @@ EAPI EO_FUNC_BODY(interface_a_power_3_get, int, 0);
|
|||
|
||||
static Eo_Op_Description op_desc[] = {
|
||||
EO_OP_FUNC(interface_a_power_3_get, NULL, "Get the a^3"),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -22,7 +22,6 @@ EAPI EO_FUNC_BODY(mixin_a_square_get, int, 0);
|
|||
|
||||
static Eo_Op_Description op_desc[] = {
|
||||
EO_OP_FUNC(mixin_a_square_get, _a_square_get, "Get the value of A^2"),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -43,7 +43,6 @@ static Eo_Op_Description op_desc[] = {
|
|||
EO_OP_FUNC(simple_a_set, _a_set, "Set property A"),
|
||||
EO_OP_FUNC(simple_a_get, _a_get, "Get property A"),
|
||||
EO_OP_FUNC_OVERRIDE(interface_a_power_3_get, _a_power_3_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -11,7 +11,6 @@ EAPI EO_FUNC_BODY(interface_a_power_3_get, int, 0);
|
|||
|
||||
static Eo_Op_Description op_desc[] = {
|
||||
EO_OP_FUNC(interface_a_power_3_get, NULL, "Get the a^3"),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -22,7 +22,6 @@ EAPI EO_FUNC_BODY(mixin_a_square_get, int, 0);
|
|||
|
||||
static Eo_Op_Description op_desc[] = {
|
||||
EO_OP_FUNC(mixin_a_square_get, _a_square_get, "Get the value of A^2"),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -43,7 +43,6 @@ static Eo_Op_Description op_desc[] = {
|
|||
EO_OP_FUNC(simple_a_set, _a_set, "Set property A"),
|
||||
EO_OP_FUNC(simple_a_get, _a_get, "Get property A"),
|
||||
EO_OP_FUNC_OVERRIDE(interface_a_power_3_get, _a_power_3_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -428,12 +428,9 @@ EAPI Eina_Bool eo_init(void);
|
|||
*/
|
||||
EAPI Eina_Bool eo_shutdown(void);
|
||||
|
||||
// computes size of Eo_Op_Description[]
|
||||
#define EO_OP_DESC_SIZE(desc) (sizeof(desc)/sizeof(*desc) - 1)
|
||||
|
||||
// Helpers macro to help populating #Eo_Class_Description.
|
||||
#define EO_CLASS_DESCRIPTION_NOOPS() { NULL, 0}
|
||||
#define EO_CLASS_DESCRIPTION_OPS(op_descs) { op_descs, EO_OP_DESC_SIZE(op_descs) }
|
||||
#define EO_CLASS_DESCRIPTION_OPS(op_descs) { op_descs, EINA_C_ARRAY_LENGTH(op_descs) }
|
||||
|
||||
// to fetch internal function and object data at once
|
||||
typedef struct _Eo_Op_Call_Data
|
||||
|
@ -538,7 +535,6 @@ EAPI extern Eo_Hook_Call eo_hook_call_post;
|
|||
#define EO_OP_CLASS_FUNC(_api, _private) { _EO_OP_API_ENTRY(_api), _private, EO_NOOP, EO_OP_TYPE_CLASS }
|
||||
#define EO_OP_FUNC_OVERRIDE(_api, _private) { _EO_OP_API_ENTRY(_api), _private, EO_OP_OVERRIDE, EO_OP_TYPE_REGULAR }
|
||||
#define EO_OP_CLASS_FUNC_OVERRIDE(_api, _private) { _EO_OP_API_ENTRY(_api), _private, EO_OP_OVERRIDE, EO_OP_TYPE_CLASS }
|
||||
#define EO_OP_SENTINEL { _EO_OP_API_ENTRY(NULL), NULL, 0, EO_OP_TYPE_INVALID }
|
||||
|
||||
// returns the OP id corresponding to the given api_func
|
||||
EAPI Eo_Op _eo_api_op_id_get(const void *api_func, Eina_Bool is_main_loop, const char *file, int line);
|
||||
|
|
|
@ -816,6 +816,7 @@ eo_api_funcs_cmp(const void *p1, const void *p2)
|
|||
static Eina_Bool
|
||||
_eo_class_funcs_set(_Eo_Class *klass)
|
||||
{
|
||||
unsigned int i;
|
||||
int op_id;
|
||||
const void *last_api_func;
|
||||
const Eo_Op_Description *api_desc;
|
||||
|
@ -832,7 +833,7 @@ _eo_class_funcs_set(_Eo_Class *klass)
|
|||
qsort((void*)op_descs, klass->desc->ops.count, sizeof(Eo_Op_Description), eo_api_funcs_cmp);
|
||||
|
||||
last_api_func = NULL;
|
||||
for (op_desc = op_descs; op_desc->op_type != EO_OP_TYPE_INVALID; op_desc++)
|
||||
for (i = 0, op_desc = op_descs; i < klass->desc->ops.count; i++, op_desc++)
|
||||
{
|
||||
if(op_desc->api_func == NULL)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,6 @@ _destructor(Eo *obj, void *class_data EINA_UNUSED)
|
|||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(reinterpret_cast<void*>(&eo_constructor), reinterpret_cast<void*>(&_constructor))
|
||||
, EO_OP_FUNC_OVERRIDE(reinterpret_cast<void*>(&eo_destructor), reinterpret_cast<void*>(&_destructor))
|
||||
, EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -20,7 +20,6 @@ EAPI EO_VOID_FUNC_BODY(inherit_prot_print);
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC(inherit_prot_print, _prot_print),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -34,7 +34,6 @@ EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC(simple_a_set, _a_set),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Event_Description *event_desc[] = {
|
||||
|
|
|
@ -42,7 +42,6 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED)
|
|||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_FUNC_OVERRIDE(simple_a_get, _a_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -166,7 +166,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(simple_a_get32, _a_get),
|
||||
EO_OP_FUNC(simple_a_set, _a_set),
|
||||
EO_OP_FUNC(simple_a_get, _a_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Event_Description *event_desc[] = {
|
||||
|
|
|
@ -40,7 +40,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(mixin_add_and_print, _add_and_print_set),
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -93,7 +93,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(simple_a_get, _a_get),
|
||||
EO_OP_FUNC(simple_b_set, _b_set),
|
||||
EO_OP_FUNC(simple_b_get, _b_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -18,7 +18,6 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED)
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -16,7 +16,6 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -16,7 +16,6 @@ _destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -16,7 +16,6 @@ _destructor(Eo *obj, void *class_data EINA_UNUSED)
|
|||
|
||||
static Eo_Op_Description op_descs [] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -20,7 +20,6 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
|||
|
||||
static Eo_Op_Description op_descs [] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -64,7 +64,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(inherit2_print2, _print2),
|
||||
EO_OP_CLASS_FUNC_OVERRIDE(simple_class_print, _class_print),
|
||||
EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -18,7 +18,6 @@ _a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -61,7 +61,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(simple_a_print, _a_print),
|
||||
EO_OP_FUNC(simple_class_print, _class_print),
|
||||
EO_OP_FUNC(simple_class_print2, _class_print2),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -12,7 +12,6 @@ EO_FUNC_BODY(interface_ab_sum_get, int, 0);
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC(interface_ab_sum_get, NULL),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -13,7 +13,6 @@ EO_FUNC_BODY(interface2_ab_sum_get2, int, 0);
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC(interface2_ab_sum_get2, NULL),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -61,7 +61,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(simple_b_get, _b_get),
|
||||
EO_OP_FUNC_OVERRIDE(interface_ab_sum_get, _ab_sum_get),
|
||||
EO_OP_FUNC_OVERRIDE(interface2_ab_sum_get2, _ab_sum_get2),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -21,7 +21,6 @@ _a_get(Eo *obj, void *class_data EINA_UNUSED)
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(simple_a_get, _a_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -35,7 +35,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor),
|
||||
EO_OP_FUNC(mixin_ab_sum_get, _ab_sum_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -49,7 +49,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor),
|
||||
EO_OP_FUNC_OVERRIDE(mixin_ab_sum_get, _ab_sum_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -48,7 +48,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor),
|
||||
EO_OP_FUNC_OVERRIDE(mixin_ab_sum_get, _ab_sum_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -42,7 +42,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(simple_a_get, _a_get),
|
||||
EO_OP_FUNC(simple_b_set, _b_set),
|
||||
EO_OP_FUNC(simple_b_get, _b_get),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -78,7 +78,6 @@ EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
|
|||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
||||
EO_OP_FUNC(simple_a_set, _a_set),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ START_TEST(eo_destructor_unref)
|
|||
|
||||
static Eo_Op_Description op_descs [] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor_unref),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -218,7 +218,6 @@ START_TEST(eo_null_api)
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC(NULL, _null_fct),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
static Eo_Class_Description class_desc = {
|
||||
EO_VERSION,
|
||||
|
@ -251,7 +250,6 @@ START_TEST(eo_wrong_override)
|
|||
|
||||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(null_fct, _null_fct),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
static Eo_Class_Description class_desc = {
|
||||
EO_VERSION,
|
||||
|
@ -285,7 +283,6 @@ START_TEST(eo_api_redefined)
|
|||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC(null_fct, _null_fct),
|
||||
EO_OP_FUNC(null_fct, NULL),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
static Eo_Class_Description class_desc = {
|
||||
EO_VERSION,
|
||||
|
@ -319,7 +316,6 @@ START_TEST(eo_dich_func_override)
|
|||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(simple_a_set, _null_fct),
|
||||
EO_OP_FUNC_OVERRIDE(simple_a_set, NULL),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
static Eo_Class_Description class_desc = {
|
||||
EO_VERSION,
|
||||
|
|
|
@ -94,7 +94,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(simple_recursive, _recursive),
|
||||
EO_OP_FUNC(simple_part_get, _part_get),
|
||||
EO_OP_FUNC(simple_pure_virtual, NULL),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -315,7 +315,6 @@ _man_des(Eo *obj, void *data EINA_UNUSED, va_list *list EINA_UNUSED)
|
|||
static Eo_Op_Description op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _man_con),
|
||||
EO_OP_FUNC_OVERRIDE(eo_destructor, _man_des),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
START_TEST(eo_man_free)
|
||||
|
@ -724,7 +723,6 @@ EO_FUNC_BODY(multi_class_hi_print, Eina_Bool, EINA_FALSE);
|
|||
static Eo_Op_Description _multi_do_op_descs[] = {
|
||||
EO_OP_FUNC(multi_a_print, _a_print),
|
||||
EO_OP_FUNC(multi_class_hi_print, _class_hi_print),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
START_TEST(eo_multiple_do)
|
||||
|
@ -896,7 +894,6 @@ _eo_add_failures_finalize(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED)
|
|||
|
||||
static Eo_Op_Description _eo_add_failures_op_descs[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_finalize, _eo_add_failures_finalize),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
START_TEST(eo_add_failures)
|
||||
|
|
|
@ -63,7 +63,6 @@ static Eo_Op_Description op_descs[] = {
|
|||
EO_OP_FUNC(thread_test_constructor, _constructor),
|
||||
EO_OP_FUNC(thread_test_v_get, _v_get),
|
||||
EO_OP_FUNC(thread_test_try_swap_stack, _try_swap_stack),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
|
|
|
@ -65,7 +65,6 @@ static Eo_Op_Description _override_op_desc[] = {
|
|||
EO_OP_FUNC(override_a_get, _override_a_get),
|
||||
EO_OP_FUNC(override_b_get, _override_b_get),
|
||||
EO_OP_FUNC(override_c_set, _override_c_set),
|
||||
EO_OP_SENTINEL
|
||||
};
|
||||
|
||||
static const Eo_Class_Description _override_class_desc = {
|
||||
|
@ -79,4 +78,4 @@ static const Eo_Class_Description _override_class_desc = {
|
|||
NULL
|
||||
};
|
||||
|
||||
EO_DEFINE_CLASS(override_class_get, &_override_class_desc, BASE_CLASS, NULL);
|
||||
EO_DEFINE_CLASS(override_class_get, &_override_class_desc, BASE_CLASS, NULL);
|
||||
|
|
Loading…
Reference in New Issue