void value_init(void)
{
typedef struct _My_Struct_V1 {
int param1;
char param2;
} My_Struct_V1;
};
NULL,
v1_members,
sizeof(My_Struct_V1)
};
V1_DESC = &v1_desc;
typedef struct _My_Struct_V2 {
int param1;
char param2;
int param3;
} My_Struct_V2;
};
NULL,
v2_members,
sizeof(My_Struct_V2)
};
V2_DESC = &v2_desc;
}
{
return;
}
{
int p1, p3;
char p2;
printf("param1: %d\nparam2: %c\n", p1, p2);
printf("param3: %d\n", p3);
}
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
value_init();
srand(time(NULL));
rand_init(v1);
my_struct_use(v1);
rand_init(v2);
my_struct_use(v2);
}
static Eina_Bool eina_value_struct_get(const Eina_Value *value, const char *name,...)
Gets the generic value from a struct member.
int eina_init(void)
Initializes the Eina library.
Definition: eina_main.c:277
static Eina_Bool eina_value_struct_set(Eina_Value *value, const char *name,...)
Sets the generic value in a struct member.
int eina_shutdown(void)
Shuts down the Eina library.
Definition: eina_main.c:348
EAPI Eina_Value * eina_value_struct_new(const Eina_Value_Struct_Desc *desc)
Creates generic value storage of type struct.
Definition: eina_value.c:5827
EAPI void eina_value_free(Eina_Value *value)
Frees value and its data.
Definition: eina_value.c:5649