forked from enlightenment/efl
Eolian: Removal of the support for custom destructors.
For no reason, I added it a long time ago.
This commit is contained in:
parent
d80fabefe9
commit
cc84a36734
|
@ -94,8 +94,7 @@ typedef enum
|
||||||
EOLIAN_PROP_SET,
|
EOLIAN_PROP_SET,
|
||||||
EOLIAN_PROP_GET,
|
EOLIAN_PROP_GET,
|
||||||
EOLIAN_METHOD,
|
EOLIAN_METHOD,
|
||||||
EOLIAN_CTOR,
|
EOLIAN_CTOR
|
||||||
EOLIAN_DTOR
|
|
||||||
} Eolian_Function_Type;
|
} Eolian_Function_Type;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
@ -144,9 +144,6 @@ eo_definitions_class_def_free(Eo_Class_Def *kls)
|
||||||
EINA_LIST_FREE(kls->constructors, meth)
|
EINA_LIST_FREE(kls->constructors, meth)
|
||||||
eo_definitions_method_def_free(meth);
|
eo_definitions_method_def_free(meth);
|
||||||
|
|
||||||
EINA_LIST_FREE(kls->destructors, meth)
|
|
||||||
eo_definitions_method_def_free(meth);
|
|
||||||
|
|
||||||
EINA_LIST_FREE(kls->properties, prop)
|
EINA_LIST_FREE(kls->properties, prop)
|
||||||
eo_definitions_property_def_free(prop);
|
eo_definitions_property_def_free(prop);
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,6 @@ typedef struct _eo_class_def
|
||||||
Eina_List *implements;
|
Eina_List *implements;
|
||||||
Eina_List *events;
|
Eina_List *events;
|
||||||
Eina_List *constructors;
|
Eina_List *constructors;
|
||||||
Eina_List *destructors;
|
|
||||||
Eina_List *properties;
|
Eina_List *properties;
|
||||||
Eina_List *methods;
|
Eina_List *methods;
|
||||||
} Eo_Class_Def;
|
} Eo_Class_Def;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -705,9 +705,6 @@ _eo_tokenizer_implement_get(Eo_Tokenizer *toknz, char *p)
|
||||||
case METH_CONSTRUCTOR:
|
case METH_CONSTRUCTOR:
|
||||||
l = &toknz->tmp.kls->constructors;
|
l = &toknz->tmp.kls->constructors;
|
||||||
break;
|
break;
|
||||||
case METH_DESTRUCTOR:
|
|
||||||
l = &toknz->tmp.kls->destructors;
|
|
||||||
break;
|
|
||||||
case METH_REGULAR:
|
case METH_REGULAR:
|
||||||
l = &toknz->tmp.kls->methods;
|
l = &toknz->tmp.kls->methods;
|
||||||
break;
|
break;
|
||||||
|
@ -813,14 +810,6 @@ _eo_tokenizer_implement_get(Eo_Tokenizer *toknz, char *p)
|
||||||
fgoto tokenize_methods;
|
fgoto tokenize_methods;
|
||||||
}
|
}
|
||||||
|
|
||||||
action begin_destructors {
|
|
||||||
INF(" destructors {");
|
|
||||||
toknz->current_methods_type = METH_DESTRUCTOR;
|
|
||||||
toknz->tmp.fscope = FUNC_PUBLIC;
|
|
||||||
toknz->current_nesting++;
|
|
||||||
fgoto tokenize_methods;
|
|
||||||
}
|
|
||||||
|
|
||||||
action begin_properties {
|
action begin_properties {
|
||||||
INF(" properties {");
|
INF(" properties {");
|
||||||
toknz->tmp.fscope = FUNC_PUBLIC;
|
toknz->tmp.fscope = FUNC_PUBLIC;
|
||||||
|
@ -986,7 +975,6 @@ _eo_tokenizer_implement_get(Eo_Tokenizer *toknz, char *p)
|
||||||
events = 'events' ignore* begin_def ignore* event_it* end_def;
|
events = 'events' ignore* begin_def ignore* event_it* end_def;
|
||||||
|
|
||||||
constructors = 'constructors' ignore* begin_def;
|
constructors = 'constructors' ignore* begin_def;
|
||||||
destructors = 'destructors' ignore* begin_def;
|
|
||||||
properties = 'properties' ignore* begin_def;
|
properties = 'properties' ignore* begin_def;
|
||||||
methods = 'methods' ignore* begin_def;
|
methods = 'methods' ignore* begin_def;
|
||||||
|
|
||||||
|
@ -1000,7 +988,6 @@ _eo_tokenizer_implement_get(Eo_Tokenizer *toknz, char *p)
|
||||||
implements => end_implements;
|
implements => end_implements;
|
||||||
events => end_events;
|
events => end_events;
|
||||||
constructors => begin_constructors;
|
constructors => begin_constructors;
|
||||||
destructors => begin_destructors;
|
|
||||||
properties => begin_properties;
|
properties => begin_properties;
|
||||||
methods => begin_methods;
|
methods => begin_methods;
|
||||||
end_def => end_class;
|
end_def => end_class;
|
||||||
|
@ -1231,20 +1218,6 @@ eo_tokenizer_dump(Eo_Tokenizer *toknz)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(kls->destructors, l, meth)
|
|
||||||
{
|
|
||||||
printf(" destructors: %s\n", meth->name);
|
|
||||||
if (meth->ret)
|
|
||||||
printf(" return: %s (%s)\n", meth->ret->type, meth->ret->comment);
|
|
||||||
printf(" legacy : %s\n", meth->legacy);
|
|
||||||
EINA_LIST_FOREACH(meth->params, m, param)
|
|
||||||
{
|
|
||||||
printf(" param: %s %s : %s (%s)\n",
|
|
||||||
_param_way_str[param->way], param->name,
|
|
||||||
param->type, param->comment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(kls->properties, l, prop)
|
EINA_LIST_FOREACH(kls->properties, l, prop)
|
||||||
{
|
{
|
||||||
printf(" property: %s\n", prop->name);
|
printf(" property: %s\n", prop->name);
|
||||||
|
@ -1490,19 +1463,6 @@ eo_tokenizer_database_fill(const char *filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(kls->destructors, l, meth)
|
|
||||||
{
|
|
||||||
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_DTOR);
|
|
||||||
database_class_function_add(kls->name, foo_id);
|
|
||||||
if (meth->ret) database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
|
|
||||||
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
|
|
||||||
EINA_LIST_FOREACH(meth->params, m, param)
|
|
||||||
{
|
|
||||||
Eolian_Type type = _types_extract(param->type, strlen(param->type));
|
|
||||||
database_method_parameter_add(foo_id, (Eolian_Parameter_Dir)param->way, type, param->name, param->comment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(kls->properties, l, prop)
|
EINA_LIST_FOREACH(kls->properties, l, prop)
|
||||||
{
|
{
|
||||||
Eolian_Function foo_id = database_function_new(prop->name, EOLIAN_UNRESOLVED);
|
Eolian_Function foo_id = database_function_new(prop->name, EOLIAN_UNRESOLVED);
|
||||||
|
|
|
@ -29,7 +29,6 @@ typedef struct
|
||||||
Eina_List *properties; /* List prop_name -> _Function_Id */
|
Eina_List *properties; /* List prop_name -> _Function_Id */
|
||||||
Eina_List *methods; /* List meth_name -> _Function_Id */
|
Eina_List *methods; /* List meth_name -> _Function_Id */
|
||||||
Eina_List *constructors; /* List constructor_name -> _Function_Id */
|
Eina_List *constructors; /* List constructor_name -> _Function_Id */
|
||||||
Eina_List *destructors; /* List destructor_name -> _Function_Id */
|
|
||||||
Eina_List *implements; /* List implements name -> _Implement_Desc */
|
Eina_List *implements; /* List implements name -> _Implement_Desc */
|
||||||
Eina_List *events; /* List event_name -> _Event_Desc */
|
Eina_List *events; /* List event_name -> _Event_Desc */
|
||||||
Eina_Bool class_ctor_enable:1;
|
Eina_Bool class_ctor_enable:1;
|
||||||
|
@ -154,7 +153,6 @@ _class_del(Class_desc *class)
|
||||||
_Function_Id *fid;
|
_Function_Id *fid;
|
||||||
Eolian_Event ev;
|
Eolian_Event ev;
|
||||||
EINA_LIST_FREE(class->constructors, fid) _fid_del(fid);
|
EINA_LIST_FREE(class->constructors, fid) _fid_del(fid);
|
||||||
EINA_LIST_FREE(class->destructors, fid) _fid_del(fid);
|
|
||||||
EINA_LIST_FREE(class->methods, fid) _fid_del(fid);
|
EINA_LIST_FREE(class->methods, fid) _fid_del(fid);
|
||||||
EINA_LIST_FREE(class->properties, fid) _fid_del(fid);
|
EINA_LIST_FREE(class->properties, fid) _fid_del(fid);
|
||||||
EINA_LIST_FREE(class->events, ev) database_event_free(ev);
|
EINA_LIST_FREE(class->events, ev) database_event_free(ev);
|
||||||
|
@ -448,9 +446,6 @@ Eina_Bool database_class_function_add(const char *class_name, Eolian_Function fo
|
||||||
case EOLIAN_CTOR:
|
case EOLIAN_CTOR:
|
||||||
desc->constructors = eina_list_append(desc->constructors, foo_id);
|
desc->constructors = eina_list_append(desc->constructors, foo_id);
|
||||||
break;
|
break;
|
||||||
case EOLIAN_DTOR:
|
|
||||||
desc->destructors = eina_list_append(desc->destructors, foo_id);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
ERR("Bad function type %d.", fid->type);
|
ERR("Bad function type %d.", fid->type);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -602,16 +597,6 @@ eolian_class_function_find_by_name(const char *class_name, const char *func_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f_type == EOLIAN_DTOR)
|
|
||||||
{
|
|
||||||
EINA_LIST_FOREACH(desc->destructors, itr, foo_id)
|
|
||||||
{
|
|
||||||
_Function_Id *fid = (_Function_Id *) foo_id;
|
|
||||||
if (!strcmp(fid->name, func_name))
|
|
||||||
return foo_id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,8 +613,6 @@ eolian_class_functions_list_get(const char *class_name, Eolian_Function_Type foo
|
||||||
return desc->methods;
|
return desc->methods;
|
||||||
case EOLIAN_CTOR:
|
case EOLIAN_CTOR:
|
||||||
return desc->constructors;
|
return desc->constructors;
|
||||||
case EOLIAN_DTOR:
|
|
||||||
return desc->destructors;
|
|
||||||
default: return NULL;
|
default: return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1211,7 +1194,6 @@ static Eina_Bool _function_print(const _Function_Id *fid, int nb_spaces)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EOLIAN_CTOR:
|
case EOLIAN_CTOR:
|
||||||
case EOLIAN_DTOR:
|
|
||||||
{
|
{
|
||||||
//char *str = eina_hash_find(fid->data, "comment");
|
//char *str = eina_hash_find(fid->data, "comment");
|
||||||
const char *str = eolian_function_description_get(foo_id, EOLIAN_COMMENT);
|
const char *str = eolian_function_description_get(foo_id, EOLIAN_COMMENT);
|
||||||
|
|
Loading…
Reference in New Issue