diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index e9ba310daf..f917c8e063 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -607,10 +607,10 @@ EAPI Eina_Bool eo_shutdown(void); #define EO2_VERSION 2 // computes size of Eo2_Op_Description[] -#define OP_DESC_SIZE(desc) (sizeof(desc)/sizeof(Eo2_Op_Description) -1 ) +#define EO2_OP_DESC_SIZE(desc) (sizeof(desc)/sizeof(*desc) - 1) // An helper macro to help populating #Eo_Class_Description. -#define EO2_CLASS_DESCRIPTION_OPS(op_descs, count) { NULL, NULL, op_descs, count } +#define EO2_CLASS_DESCRIPTION_OPS(op_descs) { NULL, NULL, op_descs, EO2_OP_DESC_SIZE(op_descs) } // sort Eo2_Op_Description[] by eapi_func then attribute OP ids EAPI void diff --git a/src/lib/eo/eo2_base_class.c b/src/lib/eo/eo2_base_class.c index beacc5c04e..218975245b 100644 --- a/src/lib/eo/eo2_base_class.c +++ b/src/lib/eo/eo2_base_class.c @@ -814,7 +814,7 @@ static const Eo_Class_Description class_desc = { EO2_VERSION, "Eo Base", EO_CLASS_TYPE_REGULAR_NO_INSTANT, - EO2_CLASS_DESCRIPTION_OPS(op_descs, OP_DESC_SIZE(op_descs)), + EO2_CLASS_DESCRIPTION_OPS(op_descs), event_desc, sizeof(Private_Data), _class_constructor,