Commit 634693c1 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Add attributes control, hidden and restricted.

Correctly set the libflags for these attributes.
parent bf3cf83e
...@@ -228,6 +228,7 @@ static struct keyword { ...@@ -228,6 +228,7 @@ static struct keyword {
/* ... */ /* ... */
{"helpstring", tHELPSTRING}, {"helpstring", tHELPSTRING},
/* ... */ /* ... */
{"hidden", tHIDDEN},
{"hyper", tHYPER}, {"hyper", tHYPER},
{"id", tID}, {"id", tID},
{"idempotent", tIDEMPOTENT}, {"idempotent", tIDEMPOTENT},
...@@ -272,6 +273,7 @@ static struct keyword { ...@@ -272,6 +273,7 @@ static struct keyword {
{"readonly", tREADONLY}, {"readonly", tREADONLY},
{"ref", tREF}, {"ref", tREF},
/* ... */ /* ... */
{"restricted", tRESTRICTED},
{"retval", tRETVAL}, {"retval", tRETVAL},
/* ... */ /* ... */
{"short", tSHORT}, {"short", tSHORT},
......
...@@ -143,6 +143,7 @@ static type_t std_uhyper = { "MIDL_uhyper" }; ...@@ -143,6 +143,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
%token tHANDLE %token tHANDLE
%token tHANDLET %token tHANDLET
%token tHELPSTRING %token tHELPSTRING
%token tHIDDEN
%token tHYPER tID tIDEMPOTENT %token tHYPER tID tIDEMPOTENT
%token tIIDIS %token tIIDIS
%token tIMPORT tIMPORTLIB %token tIMPORT tIMPORTLIB
...@@ -163,6 +164,7 @@ static type_t std_uhyper = { "MIDL_uhyper" }; ...@@ -163,6 +164,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
%token tPROPGET tPROPPUT %token tPROPGET tPROPPUT
%token tPUBLIC %token tPUBLIC
%token tREADONLY tREF %token tREADONLY tREF
%token tRESTRICTED
%token tRETVAL %token tRETVAL
%token tSHORT %token tSHORT
%token tSIGNED %token tSIGNED
...@@ -346,6 +348,7 @@ attribute: ...@@ -346,6 +348,7 @@ attribute:
| tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); } | tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); }
| tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ } | tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
| tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ } | tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ }
| tCONTROL { $$ = make_attr(ATTR_CONTROL); }
| tDEFAULT { $$ = make_attr(ATTR_DEFAULT); } | tDEFAULT { $$ = make_attr(ATTR_DEFAULT); }
| tDEFAULTVALUE '(' expr_const ')' { $$ = make_attrp(ATTR_DEFAULTVALUE, $3); } | tDEFAULTVALUE '(' expr_const ')' { $$ = make_attrp(ATTR_DEFAULTVALUE, $3); }
| tDEFAULTVALUE '(' aSTRING ')' { $$ = make_attrp(ATTR_DEFAULTVALUE, $3); } | tDEFAULTVALUE '(' aSTRING ')' { $$ = make_attrp(ATTR_DEFAULTVALUE, $3); }
...@@ -356,6 +359,7 @@ attribute: ...@@ -356,6 +359,7 @@ attribute:
| tENTRY '(' expr_const ')' { $$ = make_attrp(ATTR_ENTRY_ORDINAL, $3); } | tENTRY '(' expr_const ')' { $$ = make_attrp(ATTR_ENTRY_ORDINAL, $3); }
| tHANDLE { $$ = make_attr(ATTR_HANDLE); } | tHANDLE { $$ = make_attr(ATTR_HANDLE); }
| tHELPSTRING '(' aSTRING ')' { $$ = make_attrp(ATTR_HELPSTRING, $3); } | tHELPSTRING '(' aSTRING ')' { $$ = make_attrp(ATTR_HELPSTRING, $3); }
| tHIDDEN { $$ = make_attr(ATTR_HIDDEN); }
| tID '(' expr_const ')' { $$ = make_attrp(ATTR_ID, $3); } | tID '(' expr_const ')' { $$ = make_attrp(ATTR_ID, $3); }
| tIDEMPOTENT { $$ = make_attr(ATTR_IDEMPOTENT); } | tIDEMPOTENT { $$ = make_attr(ATTR_IDEMPOTENT); }
| tIIDIS '(' ident ')' { $$ = make_attrp(ATTR_IIDIS, $3); } | tIIDIS '(' ident ')' { $$ = make_attrp(ATTR_IIDIS, $3); }
...@@ -373,6 +377,7 @@ attribute: ...@@ -373,6 +377,7 @@ attribute:
| tPROPPUT { $$ = make_attr(ATTR_PROPPUT); } | tPROPPUT { $$ = make_attr(ATTR_PROPPUT); }
| tPUBLIC { $$ = make_attr(ATTR_PUBLIC); } | tPUBLIC { $$ = make_attr(ATTR_PUBLIC); }
| tREADONLY { $$ = make_attr(ATTR_READONLY); } | tREADONLY { $$ = make_attr(ATTR_READONLY); }
| tRESTRICTED { $$ = make_attr(ATTR_RESTRICTED); }
| tRETVAL { $$ = make_attr(ATTR_RETVAL); } | tRETVAL { $$ = make_attr(ATTR_RETVAL); }
| tSIZEIS '(' m_exprs ')' { $$ = make_attrp(ATTR_SIZEIS, $3); } | tSIZEIS '(' m_exprs ')' { $$ = make_attrp(ATTR_SIZEIS, $3); }
| tSOURCE { $$ = make_attr(ATTR_SOURCE); } | tSOURCE { $$ = make_attr(ATTR_SOURCE); }
......
...@@ -60,6 +60,7 @@ enum attr_type ...@@ -60,6 +60,7 @@ enum attr_type
ATTR_CALLAS, ATTR_CALLAS,
ATTR_CASE, ATTR_CASE,
ATTR_CONTEXTHANDLE, ATTR_CONTEXTHANDLE,
ATTR_CONTROL,
ATTR_DEFAULT, ATTR_DEFAULT,
ATTR_DEFAULTVALUE, ATTR_DEFAULTVALUE,
ATTR_DLLNAME, ATTR_DLLNAME,
...@@ -69,6 +70,7 @@ enum attr_type ...@@ -69,6 +70,7 @@ enum attr_type
ATTR_ENTRY_ORDINAL, ATTR_ENTRY_ORDINAL,
ATTR_HANDLE, ATTR_HANDLE,
ATTR_HELPSTRING, ATTR_HELPSTRING,
ATTR_HIDDEN,
ATTR_ID, ATTR_ID,
ATTR_IDEMPOTENT, ATTR_IDEMPOTENT,
ATTR_IIDIS, ATTR_IIDIS,
...@@ -87,6 +89,7 @@ enum attr_type ...@@ -87,6 +89,7 @@ enum attr_type
ATTR_PROPPUT, ATTR_PROPPUT,
ATTR_PUBLIC, ATTR_PUBLIC,
ATTR_READONLY, ATTR_READONLY,
ATTR_RESTRICTED,
ATTR_RETVAL, ATTR_RETVAL,
ATTR_SIZEIS, ATTR_SIZEIS,
ATTR_SOURCE, ATTR_SOURCE,
......
...@@ -1396,7 +1396,24 @@ static void set_lcid(msft_typelib_t *typelib) ...@@ -1396,7 +1396,24 @@ static void set_lcid(msft_typelib_t *typelib)
static void set_lib_flags(msft_typelib_t *typelib) static void set_lib_flags(msft_typelib_t *typelib)
{ {
attr_t *attr;
typelib->typelib_header.flags = 0; typelib->typelib_header.flags = 0;
for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) {
switch(attr->type) {
case ATTR_CONTROL:
typelib->typelib_header.flags |= 0x02; /* LIBFLAG_FCONTROL */
break;
case ATTR_HIDDEN:
typelib->typelib_header.flags |= 0x04; /* LIBFLAG_FHIDDEN */
break;
case ATTR_RESTRICTED:
typelib->typelib_header.flags |= 0x01; /* LIBFLAG_FRESTRICTED */
break;
default:
break;
}
}
return; return;
} }
......
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