Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
24ce74e9
Commit
24ce74e9
authored
Oct 08, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Oct 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Implement pointer_default functionality.
parent
cfa54572
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
8 deletions
+27
-8
parser.h
tools/widl/parser.h
+6
-0
parser.y
tools/widl/parser.y
+15
-8
typelib.c
tools/widl/typelib.c
+4
-0
widltypes.h
tools/widl/widltypes.h
+2
-0
No files found.
tools/widl/parser.h
View file @
24ce74e9
...
...
@@ -21,6 +21,12 @@
#ifndef __WIDL_PARSER_H
#define __WIDL_PARSER_H
typedef
struct
{
type_t
*
interface
;
unsigned
char
old_pointer_default
;
}
interface_info_t
;
int
parser_parse
(
void
);
extern
FILE
*
parser_in
;
...
...
tools/widl/parser.y
View file @
24ce74e9
...
...
@@ -155,6 +155,7 @@ static void check_all_user_types(ifref_list_t *ifaces);
UUID *uuid;
unsigned int num;
double dbl;
interface_info_t ifinfo;
}
%token <str> aIDENTIFIER
...
...
@@ -247,7 +248,8 @@ static void check_all_user_types(ifref_list_t *ifaces);
%type <expr> m_expr expr expr_const
%type <expr_list> m_exprs /* exprs expr_list */ expr_list_const
%type <array_dims> array array_list
%type <type> inherit interface interfacehdr interfacedef interfacedec
%type <ifinfo> interfacehdr
%type <type> inherit interface interfacedef interfacedec
%type <type> dispinterface dispinterfacehdr dispinterfacedef
%type <type> module modulehdr moduledef
%type <type> base_type int_std
...
...
@@ -795,32 +797,37 @@ interface: tINTERFACE aIDENTIFIER { $$ = get_type(RPC_FC_IP, $2, 0); $$->kind =
| tINTERFACE aKNOWNTYPE { $$ = get_type(RPC_FC_IP, $2, 0); $$->kind = TKIND_INTERFACE; }
;
interfacehdr: attributes interface { $$ = $2;
if ($$->defined) yyerror("multiple definition error");
$$->attrs = $1;
$$->defined = TRUE;
if (!parse_only && do_header) write_forward($$);
interfacehdr: attributes interface { $$.interface = $2;
$$.old_pointer_default = pointer_default;
if (is_attr($1, ATTR_POINTERDEFAULT))
pointer_default = get_attrv($1, ATTR_POINTERDEFAULT);
if ($2->defined) yyerror("multiple definition error");
$2->attrs = $1;
$2->defined = TRUE;
if (!parse_only && do_header) write_forward($2);
}
;
interfacedef: interfacehdr inherit
'{' int_statements '}' { $$ = $1;
'{' int_statements '}' { $$ = $1
.interface
;
$$->ref = $2;
$$->funcs = $4;
compute_method_indexes($$);
if (!parse_only && do_header) write_interface($$);
if (!parse_only && do_idfile) write_iid($$);
pointer_default = $1.old_pointer_default;
}
/* MIDL is able to import the definition of a base class from inside the
* definition of a derived class, I'll try to support it with this rule */
| interfacehdr ':' aIDENTIFIER
'{' import int_statements '}' { $$ = $1;
'{' import int_statements '}' { $$ = $1
.interface
;
$$->ref = find_type2($3, 0);
if (!$$->ref) yyerror("base class '%s' not found in import", $3);
$$->funcs = $6;
compute_method_indexes($$);
if (!parse_only && do_header) write_interface($$);
if (!parse_only && do_idfile) write_iid($$);
pointer_default = $1.old_pointer_default;
}
| dispinterfacedef { $$ = $1; }
;
...
...
tools/widl/typelib.c
View file @
24ce74e9
...
...
@@ -252,6 +252,9 @@ void start_typelib(char *name, attr_list_t *attrs)
typelib
->
attrs
=
attrs
;
list_init
(
&
typelib
->
entries
);
list_init
(
&
typelib
->
importlibs
);
if
(
is_attr
(
attrs
,
ATTR_POINTERDEFAULT
))
pointer_default
=
get_attrv
(
attrs
,
ATTR_POINTERDEFAULT
);
}
void
end_typelib
(
void
)
...
...
@@ -260,6 +263,7 @@ void end_typelib(void)
if
(
!
typelib
)
return
;
create_msft_typelib
(
typelib
);
pointer_default
=
RPC_FC_UP
;
return
;
}
...
...
tools/widl/widltypes.h
View file @
24ce74e9
...
...
@@ -307,6 +307,8 @@ struct _user_type_t {
const
char
*
name
;
};
extern
unsigned
char
pointer_default
;
extern
user_type_list_t
user_type_list
;
void
check_for_user_types_and_context_handles
(
const
var_list_t
*
list
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment