Commit 48066301 authored by Alexandre Julliard's avatar Alexandre Julliard

Added support for the propget/propput function attributes.

parent c579fa62
......@@ -90,6 +90,10 @@ static void write_pident(FILE *h, var_t *v)
void write_name(FILE *h, var_t *v)
{
if (is_attr( v->attrs, ATTR_PROPGET ))
fprintf(h, "get_" );
else if (is_attr( v->attrs, ATTR_PROPPUT ))
fprintf(h, "put_" );
fprintf(h, "%s", v->name);
}
......
......@@ -262,6 +262,8 @@ static struct keyword {
{"pointer_default", tPOINTERDEFAULT},
/* ... */
{"properties", tPROPERTIES},
{"propget", tPROPGET},
{"propput", tPROPPUT},
/* ... */
{"public", tPUBLIC},
/* ... */
......
......@@ -156,6 +156,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
%token tOUT
%token tPOINTERDEFAULT
%token tPROPERTIES
%token tPROPGET tPROPPUT
%token tPUBLIC
%token tREADONLY tREF
%token tRETVAL
......@@ -359,6 +360,8 @@ attribute:
| tOLEAUTOMATION { $$ = make_attr(ATTR_OLEAUTOMATION); }
| tOUT { $$ = make_attr(ATTR_OUT); }
| tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(ATTR_POINTERDEFAULT, $3); }
| tPROPGET { $$ = make_attr(ATTR_PROPGET); }
| tPROPPUT { $$ = make_attr(ATTR_PROPPUT); }
| tPUBLIC { $$ = make_attr(ATTR_PUBLIC); }
| tREADONLY { $$ = make_attr(ATTR_READONLY); }
| tRETVAL { $$ = make_attr(ATTR_RETVAL); }
......@@ -502,7 +505,7 @@ funcdef:
$4->attrs = $1;
$$ = make_func($4, $6);
if (is_attr($4->attrs, ATTR_IN)) {
yyerror("Inapplicatable attribute");
yyerror("Inapplicable attribute");
}
if (!is_attr($4->attrs, ATTR_OUT)) {
attr_t *a = make_attr(ATTR_OUT);
......
......@@ -83,6 +83,8 @@ enum attr_type
ATTR_OUT,
ATTR_POINTERDEFAULT,
ATTR_POINTERTYPE,
ATTR_PROPGET,
ATTR_PROPPUT,
ATTR_PUBLIC,
ATTR_READONLY,
ATTR_RETVAL,
......
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