forked from enlightenment/efl
eolian: remove support for old free() syntax
Now freefuncs can only be specified on type declarations but not on types themselves. Also remove transitiveness of freefuncs.
This commit is contained in:
parent
499ee62980
commit
65b4782682
|
@ -14,7 +14,6 @@ database_type_del(Eolian_Type *tp)
|
||||||
eina_stringshare_del(tp->base.c_name);
|
eina_stringshare_del(tp->base.c_name);
|
||||||
database_type_del(tp->base_type);
|
database_type_del(tp->base_type);
|
||||||
database_type_del(tp->next_type);
|
database_type_del(tp->next_type);
|
||||||
if (tp->freefunc) eina_stringshare_del(tp->freefunc);
|
|
||||||
free(tp);
|
free(tp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -289,9 +289,6 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* FIXME: remove this after c++/c# has fixed their stuff */
|
|
||||||
if (tp->freefunc)
|
|
||||||
tp->ownable = EINA_TRUE;
|
|
||||||
return _validate_ownable(tp);
|
return _validate_ownable(tp);
|
||||||
}
|
}
|
||||||
/* user defined */
|
/* user defined */
|
||||||
|
@ -310,7 +307,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
|
||||||
}
|
}
|
||||||
if (!_validate_typedecl(vals, tp->tdecl))
|
if (!_validate_typedecl(vals, tp->tdecl))
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
if (tp->tdecl->ownable || tp->freefunc)
|
if (tp->tdecl->ownable)
|
||||||
tp->ownable = EINA_TRUE;
|
tp->ownable = EINA_TRUE;
|
||||||
tp->base.c_name = eina_stringshare_ref(tp->tdecl->base.c_name);
|
tp->base.c_name = eina_stringshare_ref(tp->tdecl->base.c_name);
|
||||||
return _validate_ownable(tp);
|
return _validate_ownable(tp);
|
||||||
|
|
|
@ -708,22 +708,6 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr)
|
||||||
check_match(ls, ')', '(', pline, pcol);
|
check_match(ls, ')', '(', pline, pcol);
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
case KW_free:
|
|
||||||
{
|
|
||||||
int pline, pcolumn;
|
|
||||||
eo_lexer_get(ls);
|
|
||||||
pline = ls->line_number;
|
|
||||||
pcolumn = ls->column;
|
|
||||||
check_next(ls, '(');
|
|
||||||
def = parse_type_void(ls, allow_ptr);
|
|
||||||
check_next(ls, ',');
|
|
||||||
check(ls, TOK_VALUE);
|
|
||||||
def->freefunc = eina_stringshare_ref(ls->t.value.s);
|
|
||||||
eo_lexer_get(ls);
|
|
||||||
FILL_BASE(def->base, ls, line, col, TYPE);
|
|
||||||
check_match(ls, ')', '(', pline, pcolumn);
|
|
||||||
return def;
|
|
||||||
}
|
|
||||||
case KW_error:
|
case KW_error:
|
||||||
{
|
{
|
||||||
int pline, pcolumn;
|
int pline, pcolumn;
|
||||||
|
|
|
@ -264,7 +264,6 @@ struct _Eolian_Type
|
||||||
Eolian_Type_Builtin_Type btype;
|
Eolian_Type_Builtin_Type btype;
|
||||||
Eolian_Type *base_type;
|
Eolian_Type *base_type;
|
||||||
Eolian_Type *next_type;
|
Eolian_Type *next_type;
|
||||||
Eina_Stringshare *freefunc;
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
Eolian_Class *klass;
|
Eolian_Class *klass;
|
||||||
|
|
Loading…
Reference in New Issue