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[] = ...@@ -403,6 +403,7 @@ static const struct keyword attr_keywords[] =
{"optimize", tOPTIMIZE, 0}, {"optimize", tOPTIMIZE, 0},
{"optional", tOPTIONAL, 0}, {"optional", tOPTIONAL, 0},
{"out", tOUT, 0}, {"out", tOUT, 0},
{"overload", tOVERLOAD, 0},
{"partial_ignore", tPARTIALIGNORE, 0}, {"partial_ignore", tPARTIALIGNORE, 0},
{"pointer_default", tPOINTERDEFAULT, 0}, {"pointer_default", tPOINTERDEFAULT, 0},
{"progid", tPROGID, 0}, {"progid", tPROGID, 0},
......
...@@ -231,6 +231,7 @@ static typelib_t *current_typelib; ...@@ -231,6 +231,7 @@ static typelib_t *current_typelib;
%token tOBJECT tODL tOLEAUTOMATION %token tOBJECT tODL tOLEAUTOMATION
%token tOPTIMIZE tOPTIONAL %token tOPTIMIZE tOPTIONAL
%token tOUT %token tOUT
%token tOVERLOAD
%token tPARTIALIGNORE tPASCAL %token tPARTIALIGNORE tPASCAL
%token tPOINTERDEFAULT %token tPOINTERDEFAULT
%token tPRAGMA_WARNING %token tPRAGMA_WARNING
...@@ -669,6 +670,7 @@ attribute: { $$ = NULL; } ...@@ -669,6 +670,7 @@ attribute: { $$ = NULL; }
| tOPTIMIZE '(' aSTRING ')' { $$ = make_attrp(ATTR_OPTIMIZE, $3); } | tOPTIMIZE '(' aSTRING ')' { $$ = make_attrp(ATTR_OPTIMIZE, $3); }
| tOPTIONAL { $$ = make_attr(ATTR_OPTIONAL); } | tOPTIONAL { $$ = make_attr(ATTR_OPTIONAL); }
| tOUT { $$ = make_attr(ATTR_OUT); } | tOUT { $$ = make_attr(ATTR_OUT); }
| tOVERLOAD '(' aSTRING ')' { $$ = make_attrp(ATTR_OVERLOAD, $3); }
| tPARTIALIGNORE { $$ = make_attr(ATTR_PARTIALIGNORE); } | tPARTIALIGNORE { $$ = make_attr(ATTR_PARTIALIGNORE); }
| tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(ATTR_POINTERDEFAULT, $3); } | tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(ATTR_POINTERDEFAULT, $3); }
| tPROGID '(' aSTRING ')' { $$ = make_attrp(ATTR_PROGID, $3); } | tPROGID '(' aSTRING ')' { $$ = make_attrp(ATTR_PROGID, $3); }
...@@ -2385,6 +2387,7 @@ struct allowed_attr allowed_attr[] = ...@@ -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_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_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_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_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_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" }, /* 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 ...@@ -146,6 +146,7 @@ enum attr_type
ATTR_OPTIMIZE, ATTR_OPTIMIZE,
ATTR_OPTIONAL, ATTR_OPTIONAL,
ATTR_OUT, ATTR_OUT,
ATTR_OVERLOAD,
ATTR_PARAMLCID, ATTR_PARAMLCID,
ATTR_PARTIALIGNORE, ATTR_PARTIALIGNORE,
ATTR_POINTERDEFAULT, ATTR_POINTERDEFAULT,
......
...@@ -1419,6 +1419,8 @@ static int add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) ...@@ -1419,6 +1419,8 @@ static int add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index)
break; break;
case ATTR_OUT: case ATTR_OUT:
break; break;
case ATTR_OVERLOAD:
break;
case ATTR_PROPGET: case ATTR_PROPGET:
invokekind = 0x2; /* INVOKE_PROPERTYGET */ invokekind = 0x2; /* INVOKE_PROPERTYGET */
break; 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