forked from enlightenment/efl
eolian: generate underscored structs as well as correct opaque struct typedefs
This commit is contained in:
parent
7a614c80f3
commit
ec73644cb6
|
@ -87,11 +87,11 @@ _type_generate(const Eolian_Type *tp, Eina_Bool in_typedef, Eina_Bool full)
|
|||
char *name = _concat_name(tp);
|
||||
if ((in_typedef && name) || tp_type == EOLIAN_TYPE_STRUCT_OPAQUE || !full)
|
||||
{
|
||||
eina_strbuf_append_printf(buf, "struct %s", name);
|
||||
eina_strbuf_append_printf(buf, "typedef struct _%s %s", name, name);
|
||||
free(name);
|
||||
break;
|
||||
}
|
||||
eina_strbuf_append_printf(buf, "typedef struct\n{\n");
|
||||
eina_strbuf_append_printf(buf, "typedef struct _%s\n{\n", name);
|
||||
Eina_Iterator *members = eolian_type_struct_fields_get(tp);
|
||||
EINA_ITERATOR_FOREACH(members, member)
|
||||
{
|
||||
|
|
|
@ -11,18 +11,18 @@ typedef Eo Struct;
|
|||
#ifndef _STRUCT_EO_TYPES
|
||||
#define _STRUCT_EO_TYPES
|
||||
|
||||
typedef struct
|
||||
typedef struct _Named
|
||||
{
|
||||
int field;
|
||||
const char *something;
|
||||
} Named;
|
||||
|
||||
typedef struct
|
||||
typedef struct _Another
|
||||
{
|
||||
Named field;
|
||||
} Another;
|
||||
|
||||
struct Opaque;
|
||||
typedef struct _Opaque Opaque;
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue