Commit a10740f3 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

widl: Remove custom attribute creation helper.

parent 7771a9ae
......@@ -40,17 +40,6 @@ attr_t *attr_ptr( enum attr_type attr_type, void *val )
return a;
}
attr_t *make_custom_attr( struct uuid *id, expr_t *pval )
{
attr_t *a = xmalloc( sizeof(attr_t) );
attr_custdata_t *cstdata = xmalloc( sizeof(attr_custdata_t) );
a->type = ATTR_CUSTOM;
cstdata->id = *id;
cstdata->pval = pval;
a->u.pval = cstdata;
return a;
}
int is_attr( const attr_list_t *list, enum attr_type attr_type )
{
const attr_t *attr;
......
......@@ -625,7 +625,10 @@ attribute
| tCONTRACT '(' contract_req ')' { $$ = attr_ptr( ATTR_CONTRACT, $3 ); }
| tCONTRACTVERSION '(' contract_ver ')' { $$ = attr_int( ATTR_CONTRACTVERSION, $3 ); }
| tCONTROL { $$ = attr_int( ATTR_CONTROL, 0 ); }
| tCUSTOM '(' aUUID ',' expr_const ')' { $$ = make_custom_attr( $3, $5 ); }
| tCUSTOM '(' aUUID ',' expr_const ')' { attr_custdata_t *data = xmalloc( sizeof(*data) );
data->id = *$3; data->pval = $5;
$$ = attr_ptr( ATTR_CUSTOM, data );
}
| tDECODE { $$ = attr_int( ATTR_DECODE, 0 ); }
| tDEFAULT { $$ = attr_int( ATTR_DEFAULT, 0 ); }
| tDEFAULTBIND { $$ = attr_int( ATTR_DEFAULTBIND, 0 ); }
......
......@@ -99,7 +99,6 @@ extern void end_cplusplus_guard(FILE *fp);
extern attr_t *attr_int( enum attr_type attr_type, unsigned int val );
extern attr_t *attr_ptr( enum attr_type attr_type, void *val );
extern attr_t *make_custom_attr( struct uuid *id, expr_t *pval );
extern int is_attr( const attr_list_t *list, enum attr_type attr_type );
extern int is_ptrchain_attr( const var_t *var, enum attr_type attr_type );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment