mirror of
https://github.com/reactos/wine.git
synced 2024-12-02 08:46:29 +00:00
Add attributes control, hidden and restricted.
Correctly set the libflags for these attributes.
This commit is contained in:
parent
bf3cf83e02
commit
634693c114
@ -228,6 +228,7 @@ static struct keyword {
|
||||
/* ... */
|
||||
{"helpstring", tHELPSTRING},
|
||||
/* ... */
|
||||
{"hidden", tHIDDEN},
|
||||
{"hyper", tHYPER},
|
||||
{"id", tID},
|
||||
{"idempotent", tIDEMPOTENT},
|
||||
@ -272,6 +273,7 @@ static struct keyword {
|
||||
{"readonly", tREADONLY},
|
||||
{"ref", tREF},
|
||||
/* ... */
|
||||
{"restricted", tRESTRICTED},
|
||||
{"retval", tRETVAL},
|
||||
/* ... */
|
||||
{"short", tSHORT},
|
||||
|
@ -143,6 +143,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
|
||||
%token tHANDLE
|
||||
%token tHANDLET
|
||||
%token tHELPSTRING
|
||||
%token tHIDDEN
|
||||
%token tHYPER tID tIDEMPOTENT
|
||||
%token tIIDIS
|
||||
%token tIMPORT tIMPORTLIB
|
||||
@ -163,6 +164,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
|
||||
%token tPROPGET tPROPPUT
|
||||
%token tPUBLIC
|
||||
%token tREADONLY tREF
|
||||
%token tRESTRICTED
|
||||
%token tRETVAL
|
||||
%token tSHORT
|
||||
%token tSIGNED
|
||||
@ -346,6 +348,7 @@ attribute:
|
||||
| tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); }
|
||||
| tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
|
||||
| tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ }
|
||||
| tCONTROL { $$ = make_attr(ATTR_CONTROL); }
|
||||
| tDEFAULT { $$ = make_attr(ATTR_DEFAULT); }
|
||||
| tDEFAULTVALUE '(' expr_const ')' { $$ = make_attrp(ATTR_DEFAULTVALUE, $3); }
|
||||
| tDEFAULTVALUE '(' aSTRING ')' { $$ = make_attrp(ATTR_DEFAULTVALUE, $3); }
|
||||
@ -356,6 +359,7 @@ attribute:
|
||||
| tENTRY '(' expr_const ')' { $$ = make_attrp(ATTR_ENTRY_ORDINAL, $3); }
|
||||
| tHANDLE { $$ = make_attr(ATTR_HANDLE); }
|
||||
| tHELPSTRING '(' aSTRING ')' { $$ = make_attrp(ATTR_HELPSTRING, $3); }
|
||||
| tHIDDEN { $$ = make_attr(ATTR_HIDDEN); }
|
||||
| tID '(' expr_const ')' { $$ = make_attrp(ATTR_ID, $3); }
|
||||
| tIDEMPOTENT { $$ = make_attr(ATTR_IDEMPOTENT); }
|
||||
| tIIDIS '(' ident ')' { $$ = make_attrp(ATTR_IIDIS, $3); }
|
||||
@ -373,6 +377,7 @@ attribute:
|
||||
| tPROPPUT { $$ = make_attr(ATTR_PROPPUT); }
|
||||
| tPUBLIC { $$ = make_attr(ATTR_PUBLIC); }
|
||||
| tREADONLY { $$ = make_attr(ATTR_READONLY); }
|
||||
| tRESTRICTED { $$ = make_attr(ATTR_RESTRICTED); }
|
||||
| tRETVAL { $$ = make_attr(ATTR_RETVAL); }
|
||||
| tSIZEIS '(' m_exprs ')' { $$ = make_attrp(ATTR_SIZEIS, $3); }
|
||||
| tSOURCE { $$ = make_attr(ATTR_SOURCE); }
|
||||
|
@ -60,6 +60,7 @@ enum attr_type
|
||||
ATTR_CALLAS,
|
||||
ATTR_CASE,
|
||||
ATTR_CONTEXTHANDLE,
|
||||
ATTR_CONTROL,
|
||||
ATTR_DEFAULT,
|
||||
ATTR_DEFAULTVALUE,
|
||||
ATTR_DLLNAME,
|
||||
@ -69,6 +70,7 @@ enum attr_type
|
||||
ATTR_ENTRY_ORDINAL,
|
||||
ATTR_HANDLE,
|
||||
ATTR_HELPSTRING,
|
||||
ATTR_HIDDEN,
|
||||
ATTR_ID,
|
||||
ATTR_IDEMPOTENT,
|
||||
ATTR_IIDIS,
|
||||
@ -87,6 +89,7 @@ enum attr_type
|
||||
ATTR_PROPPUT,
|
||||
ATTR_PUBLIC,
|
||||
ATTR_READONLY,
|
||||
ATTR_RESTRICTED,
|
||||
ATTR_RETVAL,
|
||||
ATTR_SIZEIS,
|
||||
ATTR_SOURCE,
|
||||
|
@ -1396,7 +1396,24 @@ static void set_lcid(msft_typelib_t *typelib)
|
||||
|
||||
static void set_lib_flags(msft_typelib_t *typelib)
|
||||
{
|
||||
attr_t *attr;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user