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:
Daniel Kolesa 2019-07-17 20:14:46 +02:00
parent 499ee62980
commit 65b4782682
4 changed files with 1 additions and 22 deletions

View File

@ -14,7 +14,6 @@ database_type_del(Eolian_Type *tp)
eina_stringshare_del(tp->base.c_name);
database_type_del(tp->base_type);
database_type_del(tp->next_type);
if (tp->freefunc) eina_stringshare_del(tp->freefunc);
free(tp);
}

View File

@ -289,9 +289,6 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
default:
break;
}
/* FIXME: remove this after c++/c# has fixed their stuff */
if (tp->freefunc)
tp->ownable = EINA_TRUE;
return _validate_ownable(tp);
}
/* user defined */
@ -310,7 +307,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
}
if (!_validate_typedecl(vals, tp->tdecl))
return EINA_FALSE;
if (tp->tdecl->ownable || tp->freefunc)
if (tp->tdecl->ownable)
tp->ownable = EINA_TRUE;
tp->base.c_name = eina_stringshare_ref(tp->tdecl->base.c_name);
return _validate_ownable(tp);

View File

@ -708,22 +708,6 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr)
check_match(ls, ')', '(', pline, pcol);
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:
{
int pline, pcolumn;

View File

@ -264,7 +264,6 @@ struct _Eolian_Type
Eolian_Type_Builtin_Type btype;
Eolian_Type *base_type;
Eolian_Type *next_type;
Eina_Stringshare *freefunc;
union
{
Eolian_Class *klass;