diff --git a/legacy/eet/ChangeLog b/legacy/eet/ChangeLog index 61b2e80b88..3936cc6606 100644 --- a/legacy/eet/ChangeLog +++ b/legacy/eet/ChangeLog @@ -454,3 +454,6 @@ * Fix another bug related to cipher and compression (leak and bad free) +2010-11-25 Cedric BAIL + + * Add EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY_STRING. diff --git a/legacy/eet/src/lib/Eet.h b/legacy/eet/src/lib/Eet.h index 68d942a6b5..6159cf0c3f 100644 --- a/legacy/eet/src/lib/Eet.h +++ b/legacy/eet/src/lib/Eet.h @@ -2527,6 +2527,35 @@ eet_data_descriptor_encode(Eet_Data_Descriptor *edd, subtype); \ } while (0) +/** + * Add a variable size array type to a data descriptor + * @param edd The data descriptor to add the type to. + * @param struct_type The type of the struct. + * @param name The string name to use to encode/decode this member + * (must be a constant global and never change). + * @param member The struct member itself to be encoded. + * + * This macro lets you easily add a fixed size array of string. All + * the parameters are the same as for EET_DATA_DESCRIPTOR_ADD_BASIC(). + * + * @since 1.4.0 + * @ingroup Eet_Data_Group + */ +#define EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY_STRING(edd, struct_type, name, member) \ + do { \ + struct_type ___ett; \ + eet_data_descriptor_element_add(edd, \ + name, \ + EET_T_STRING, \ + EET_G_VAR_ARRAY, \ + (char *)(& (___ett.member)) - \ + (char *)(& (___ett)), \ + (char *)(& (___ett.member ## _count)) - \ + (char *)(& (___ett)), \ + /* 0, */ NULL, \ + NULL); \ + } while (0) + /** * Add an union type to a data descriptor * @param edd The data descriptor to add the type to.