* eet: add EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY_STRING.

SVN revision: 54989
This commit is contained in:
Cedric BAIL 2010-11-25 15:59:46 +00:00
parent 14f8c7b24f
commit db4e12ca36
2 changed files with 32 additions and 0 deletions

View File

@ -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.

View File

@ -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.