q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=441455259e3ba517950bfb919cefbb4b61eb3986
commit 441455259e3ba517950bfb919cefbb4b61eb3986 Author: Daniel Kolesa <[email protected]> Date: Thu Jul 10 14:19:06 2014 +0100 eolian: refactoring: more consistent naming --- src/lib/eolian/database_type.c | 4 ++-- src/lib/eolian/database_type_api.c | 6 +++--- src/lib/eolian/eo_definitions.h | 32 ++++++++++++++++---------------- src/lib/eolian/eolian_database.c | 2 +- src/lib/eolian/eolian_database.h | 24 ++++++++++++------------ 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index c9d2c96..0c690ad 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -14,7 +14,7 @@ database_type_add(const char *alias, Eolian_Type *type) { if (_types) { - Type_Desc *desc = calloc(1, sizeof(*desc)); + Eolian_Typedef *desc = calloc(1, sizeof(*desc)); desc->alias = eina_stringshare_add(alias); desc->type = type; eina_hash_set(_types, desc->alias, desc); @@ -58,7 +58,7 @@ static Eina_Bool _stype_field_cb(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) { - database_type_to_str((Eolian_Type*)((_Struct_Field_Type*)data)->type, + database_type_to_str((Eolian_Type*)((Eolian_Struct_Field*)data)->type, (Eina_Strbuf*)fdata, (const char*)key); eina_strbuf_append((Eina_Strbuf*)fdata, "; "); return EINA_TRUE; diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index 10702b3..915cba0 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -7,7 +7,7 @@ eolian_type_find_by_alias(const char *alias) { if (!_types) return NULL; Eina_Stringshare *shr = eina_stringshare_add(alias); - Type_Desc *cl = eina_hash_find(_types, shr); + Eolian_Typedef *cl = eina_hash_find(_types, shr); eina_stringshare_del(shr); return cl?cl->type:NULL; } @@ -62,7 +62,7 @@ eolian_type_struct_field_names_list_get(const Eolian_Type *tp) EAPI const Eolian_Type * eolian_type_struct_field_get(const Eolian_Type *tp, const char *field) { - _Struct_Field_Type *sf = NULL; + Eolian_Struct_Field *sf = NULL; EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(field, NULL); EINA_SAFETY_ON_FALSE_RETURN_VAL(tp->type == EOLIAN_TYPE_STRUCT, NULL); @@ -74,7 +74,7 @@ eolian_type_struct_field_get(const Eolian_Type *tp, const char *field) EAPI Eina_Stringshare * eolian_type_struct_field_description_get(const Eolian_Type *tp, const char *field) { - _Struct_Field_Type *sf = NULL; + Eolian_Struct_Field *sf = NULL; EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(field, NULL); EINA_SAFETY_ON_FALSE_RETURN_VAL(tp->type == EOLIAN_TYPE_STRUCT, NULL); diff --git a/src/lib/eolian/eo_definitions.h b/src/lib/eolian/eo_definitions.h index 8c5343d..a908f08 100644 --- a/src/lib/eolian/eo_definitions.h +++ b/src/lib/eolian/eo_definitions.h @@ -6,8 +6,8 @@ /* TYPE */ -typedef struct _eo_type_def Eo_Type_Def; -struct _eo_type_def +typedef struct _Eo_Type_Def Eo_Type_Def; +struct _Eo_Type_Def { Eina_Stringshare *name; Eolian_Type_Type type; @@ -29,7 +29,7 @@ struct _eo_type_def Eina_Bool is_own :1; }; -typedef struct _eo_struct_field_def +typedef struct _Eo_Struct_Field_Def { Eo_Type_Def *type; Eina_Stringshare *comment; @@ -37,7 +37,7 @@ typedef struct _eo_struct_field_def /* RET */ -typedef struct _eo_ret_def +typedef struct _Eo_Ret_Def { Eo_Type_Def *type; Eina_Stringshare *comment; @@ -47,7 +47,7 @@ typedef struct _eo_ret_def /* PARAM */ -typedef enum _param_way +typedef enum _Param_Way { PARAM_IN, PARAM_OUT, @@ -55,7 +55,7 @@ typedef enum _param_way PARAM_WAY_LAST } Param_Way; -typedef struct _eo_param_def +typedef struct _Eo_Param_Def { Param_Way way; Eo_Type_Def *type; @@ -66,20 +66,20 @@ typedef struct _eo_param_def /* ACCESSOR */ -typedef enum _eo_accessor_type +typedef enum _Eo_Accessor_Type { SETTER, GETTER, ACCESSOR_TYPE_LAST } Eo_Accessor_Type; -typedef struct _eo_accessor_param +typedef struct _Eo_Accessor_Param { Eina_Stringshare *name; Eina_Bool is_const:1; } Eo_Accessor_Param; -typedef struct _eo_accessor_def +typedef struct _Eo_Accessor_Def { Eo_Accessor_Type type; Eo_Ret_Def *ret; @@ -90,7 +90,7 @@ typedef struct _eo_accessor_def /* PROPERTY */ -typedef struct _eo_property_def +typedef struct _Eo_Property_Def { Eina_Stringshare *name; Eina_List *keys; @@ -101,13 +101,13 @@ typedef struct _eo_property_def /* METHOD */ -typedef enum _eo_method_type { +typedef enum _Eo_Method_Type { METH_REGULAR, METH_CONSTRUCTOR, METH_TYPE_LAST } Eo_Method_Type; -typedef struct _eo_method_def +typedef struct _Eo_Method_Def { Eo_Ret_Def *ret; Eo_Method_Type type; @@ -121,7 +121,7 @@ typedef struct _eo_method_def /* SIGNAL */ -typedef struct _eo_event_def +typedef struct _Eo_Event_Def { Eina_Stringshare *name; Eina_Stringshare *type; @@ -130,14 +130,14 @@ typedef struct _eo_event_def /* IMPLEMENT */ -typedef struct _eo_implement_def +typedef struct _Eo_Implement_Def { Eina_Stringshare *meth_name; } Eo_Implement_Def; /* CLASS */ -typedef struct _eo_class_def +typedef struct _Eo_Class_Def { Eina_Stringshare *name; Eolian_Class_Type type; @@ -155,7 +155,7 @@ typedef struct _eo_class_def /* TYPE */ -typedef struct _eo_typedef_def +typedef struct _Eo_Typedef_Def { Eina_Stringshare *alias; Eo_Type_Def *type; diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 7a283d8..7239148 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -12,7 +12,7 @@ static int _database_init_count = 0; static void _type_hash_free_cb(void *data) { - Type_Desc *type = data; + Eolian_Typedef *type = data; eina_stringshare_del(type->alias); database_type_del(type->type); free(type); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index d43a76e..cbf67a8 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -70,12 +70,6 @@ struct _Eolian_Class Eina_Bool class_dtor_enable:1; }; -typedef struct -{ - Eina_Stringshare *alias; - Eolian_Type *type; -} Type_Desc; - struct _Eolian_Function { Eina_Stringshare *name; @@ -106,12 +100,6 @@ struct _Eolian_Function_Parameter /* maps directly to Eo_Type_Def */ -typedef struct -{ - Eolian_Type *type; - Eina_Stringshare *comment; -} _Struct_Field_Type; - struct _Eolian_Type { Eina_Stringshare *name; @@ -146,6 +134,18 @@ struct _Eolian_Event Eina_Stringshare *comment; }; +typedef struct _Eolian_Typedef +{ + Eina_Stringshare *alias; + Eolian_Type *type; +} Eolian_Typedef; + +typedef struct _Eolian_Struct_Field +{ + Eolian_Type *type; + Eina_Stringshare *comment; +} Eolian_Struct_Field; + int database_init(); int database_shutdown(); --
