Commit 64d5feb4 authored by Bernhard Kölbl's avatar Bernhard Kölbl Committed by Alexandre Julliard

widl: Add support for the [overload] attribute.

The attribute is used by WinRT and doesn't have any effect on the generated headers. Signed-off-by: 's avatarBernhard Kölbl <besentv@gmail.com> Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7a6ef5c2
......@@ -403,6 +403,7 @@ static const struct keyword attr_keywords[] =
{"optimize", tOPTIMIZE, 0},
{"optional", tOPTIONAL, 0},
{"out", tOUT, 0},
{"overload", tOVERLOAD, 0},
{"partial_ignore", tPARTIALIGNORE, 0},
{"pointer_default", tPOINTERDEFAULT, 0},
{"progid", tPROGID, 0},
......
......@@ -231,6 +231,7 @@ static typelib_t *current_typelib;
%token tOBJECT tODL tOLEAUTOMATION
%token tOPTIMIZE tOPTIONAL
%token tOUT
%token tOVERLOAD
%token tPARTIALIGNORE tPASCAL
%token tPOINTERDEFAULT
%token tPRAGMA_WARNING
......@@ -669,6 +670,7 @@ attribute: { $$ = NULL; }
| tOPTIMIZE '(' aSTRING ')' { $$ = make_attrp(ATTR_OPTIMIZE, $3); }
| tOPTIONAL { $$ = make_attr(ATTR_OPTIONAL); }
| tOUT { $$ = make_attr(ATTR_OUT); }
| tOVERLOAD '(' aSTRING ')' { $$ = make_attrp(ATTR_OVERLOAD, $3); }
| tPARTIALIGNORE { $$ = make_attr(ATTR_PARTIALIGNORE); }
| tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(ATTR_POINTERDEFAULT, $3); }
| tPROGID '(' aSTRING ')' { $$ = make_attrp(ATTR_PROGID, $3); }
......@@ -2385,6 +2387,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_OPTIMIZE */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optimize" },
/* ATTR_OPTIONAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optional" },
/* ATTR_OUT */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "out" },
/* ATTR_OVERLOAD */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "overload" },
/* ATTR_PARAMLCID */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "lcid" },
/* ATTR_PARTIALIGNORE */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "partial_ignore" },
/* ATTR_POINTERDEFAULT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" },
......
......@@ -146,6 +146,7 @@ enum attr_type
ATTR_OPTIMIZE,
ATTR_OPTIONAL,
ATTR_OUT,
ATTR_OVERLOAD,
ATTR_PARAMLCID,
ATTR_PARTIALIGNORE,
ATTR_POINTERDEFAULT,
......
......@@ -1419,6 +1419,8 @@ static int add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index)
break;
case ATTR_OUT:
break;
case ATTR_OVERLOAD:
break;
case ATTR_PROPGET:
invokekind = 0x2; /* INVOKE_PROPERTYGET */
break;
......
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