The attribute is used by WinRT and doesn't have any effect on the generated headers.
Signed-off-by: Bernhard Kölbl besentv@gmail.com --- tools/widl/parser.l | 1 + tools/widl/parser.y | 3 +++ tools/widl/widltypes.h | 1 + tools/widl/write_msft.c | 2 ++ 4 files changed, 7 insertions(+)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 8fb5c91e6dc..6542b7acfc3 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -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}, diff --git a/tools/widl/parser.y b/tools/widl/parser.y index d7fc009c5c2..2c33fa1b9f3 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -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" }, diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 622c4708a87..3a344149621 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -146,6 +146,7 @@ enum attr_type ATTR_OPTIMIZE, ATTR_OPTIONAL, ATTR_OUT, + ATTR_OVERLOAD, ATTR_PARAMLCID, ATTR_PARTIALIGNORE, ATTR_POINTERDEFAULT, diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 7c00a7d59af..71f454a8c34 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -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;