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
979bdf28
Commit
979bdf28
authored
Mar 23, 2010
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Remove func_t type.
It was just a simple indirection to get to a var_t, so just replace all uses of it with the latter.
parent
a3f649f7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
50 deletions
+15
-50
parser.y
tools/widl/parser.y
+8
-33
typetree.c
tools/widl/typetree.c
+1
-1
typetree.h
tools/widl/typetree.h
+1
-1
widltypes.h
tools/widl/widltypes.h
+1
-11
write_msft.c
tools/widl/write_msft.c
+4
-4
No files found.
tools/widl/parser.y
View file @
979bdf28
...
...
@@ -108,8 +108,6 @@ static ifref_t *make_ifref(type_t *iface);
static var_list_t *append_var_list(var_list_t *list, var_list_t *vars);
static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *p);
static declarator_t *make_declarator(var_t *var);
static func_list_t *append_func(func_list_t *list, func_t *func);
static func_t *make_func(var_t *def);
static type_t *make_safearray(type_t *type);
static typelib_t *make_library(const char *name, const attr_list_t *attrs);
static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type);
...
...
@@ -165,8 +163,6 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
var_list_t *var_list;
declarator_t *declarator;
declarator_list_t *declarator_list;
func_t *func;
func_list_t *func_list;
statement_t *statement;
statement_list_t *stmt_list;
ifref_t *ifref;
...
...
@@ -293,14 +289,14 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
%type <ifref> coclass_int
%type <ifref_list> coclass_ints
%type <var> arg ne_union_field union_field s_field case enum declaration
%type <var_list> m_args arg_list args
%type <var> funcdef
%type <var_list> m_args arg_list args dispint_meths
%type <var_list> fields ne_union_fields cases enums enum_list dispint_props field
%type <var> m_ident ident
%type <declarator> declarator direct_declarator init_declarator struct_declarator
%type <declarator> m_any_declarator any_declarator any_declarator_no_direct any_direct_declarator
%type <declarator> m_abstract_declarator abstract_declarator abstract_declarator_no_direct abstract_direct_declarator
%type <declarator_list> declarator_list struct_declarator_list
%type <func> funcdef
%type <type> coclass coclasshdr coclassdef
%type <num> pointer_type version
%type <str> libraryhdr callconv cppquote importlib import t_ident
...
...
@@ -308,7 +304,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
%type <import> import_start
%type <typelib> library_start librarydef
%type <statement> statement typedef
%type <stmt_list> gbl_statements imp_statements int_statements
dispint_meths
%type <stmt_list> gbl_statements imp_statements int_statements
%left ','
%right '?' ':'
...
...
@@ -720,12 +716,10 @@ s_field: m_attributes decl_spec declarator { $$ = declare_var(check_field_attrs
}
;
funcdef:
m_attributes decl_spec declarator { var_t *v;
v = declare_var(check_function_attrs($3->var->name, $1),
$2, $3, FALSE);
free($3);
$$ = make_func(v);
funcdef: declaration { $$ = $1;
if (type_get_type($$->type) != TYPE_FUNCTION)
error_loc("only methods may be declared inside the methods section of a dispinterface\n");
check_function_attrs($$->name, $$->attrs);
}
;
...
...
@@ -826,7 +820,7 @@ dispint_props: tPROPERTIES ':' { $$ = NULL; }
;
dispint_meths: tMETHODS ':' { $$ = NULL; }
| dispint_meths funcdef ';' { $$ = append_
func
( $1, $2 ); }
| dispint_meths funcdef ';' { $$ = append_
var
( $1, $2 ); }
;
dispinterfacedef: dispinterfacehdr '{'
...
...
@@ -1693,25 +1687,6 @@ static declarator_t *make_declarator(var_t *var)
return d;
}
static func_list_t *append_func(func_list_t *list, func_t *func)
{
if (!func) return list;
if (!list)
{
list = xmalloc( sizeof(*list) );
list_init( list );
}
list_add_tail( list, &func->entry );
return list;
}
static func_t *make_func(var_t *def)
{
func_t *f = xmalloc(sizeof(func_t));
f->def = def;
return f;
}
static type_t *make_safearray(type_t *type)
{
return type_new_array(NULL, type_new_alias(type, "SAFEARRAY"), TRUE, 0,
...
...
tools/widl/typetree.c
View file @
979bdf28
...
...
@@ -386,7 +386,7 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm
compute_method_indexes
(
iface
);
}
void
type_dispinterface_define
(
type_t
*
iface
,
var_list_t
*
props
,
func
_list_t
*
methods
)
void
type_dispinterface_define
(
type_t
*
iface
,
var_list_t
*
props
,
var
_list_t
*
methods
)
{
iface
->
details
.
iface
=
xmalloc
(
sizeof
(
*
iface
->
details
.
iface
));
iface
->
details
.
iface
->
disp_props
=
props
;
...
...
tools/widl/typetree.h
View file @
979bdf28
...
...
@@ -41,7 +41,7 @@ type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t
type_t
*
type_new_encapsulated_union
(
char
*
name
,
var_t
*
switch_field
,
var_t
*
union_field
,
var_list_t
*
cases
);
type_t
*
type_new_bitfield
(
type_t
*
field_type
,
const
expr_t
*
bits
);
void
type_interface_define
(
type_t
*
iface
,
type_t
*
inherit
,
statement_list_t
*
stmts
);
void
type_dispinterface_define
(
type_t
*
iface
,
var_list_t
*
props
,
func
_list_t
*
methods
);
void
type_dispinterface_define
(
type_t
*
iface
,
var_list_t
*
props
,
var
_list_t
*
methods
);
void
type_dispinterface_define_from_iface
(
type_t
*
dispiface
,
type_t
*
iface
);
void
type_module_define
(
type_t
*
module
,
statement_list_t
*
stmts
);
type_t
*
type_coclass_define
(
type_t
*
coclass
,
ifref_list_t
*
ifaces
);
...
...
tools/widl/widltypes.h
View file @
979bdf28
...
...
@@ -41,7 +41,6 @@ typedef struct _expr_t expr_t;
typedef
struct
_type_t
type_t
;
typedef
struct
_var_t
var_t
;
typedef
struct
_declarator_t
declarator_t
;
typedef
struct
_func_t
func_t
;
typedef
struct
_ifref_t
ifref_t
;
typedef
struct
_typelib_entry_t
typelib_entry_t
;
typedef
struct
_importlib_t
importlib_t
;
...
...
@@ -54,7 +53,6 @@ typedef struct _statement_t statement_t;
typedef
struct
list
attr_list_t
;
typedef
struct
list
str_list_t
;
typedef
struct
list
func_list_t
;
typedef
struct
list
expr_list_t
;
typedef
struct
list
var_list_t
;
typedef
struct
list
declarator_list_t
;
...
...
@@ -301,7 +299,7 @@ struct func_details
struct
iface_details
{
statement_list_t
*
stmts
;
func
_list_t
*
disp_methods
;
var
_list_t
*
disp_methods
;
var_list_t
*
disp_props
;
struct
_type_t
*
inherit
;
};
...
...
@@ -309,7 +307,6 @@ struct iface_details
struct
module_details
{
statement_list_t
*
stmts
;
func_list_t
*
funcs
;
};
struct
array_details
...
...
@@ -418,13 +415,6 @@ struct _declarator_t {
struct
list
entry
;
};
struct
_func_t
{
var_t
*
def
;
/* parser-internal */
struct
list
entry
;
};
struct
_ifref_t
{
type_t
*
iface
;
attr_list_t
*
attrs
;
...
...
tools/widl/write_msft.c
View file @
979bdf28
...
...
@@ -1950,7 +1950,7 @@ static void add_dispatch(msft_typelib_t *typelib)
static
void
add_dispinterface_typeinfo
(
msft_typelib_t
*
typelib
,
type_t
*
dispinterface
)
{
int
idx
=
0
;
const
func
_t
*
func
;
var
_t
*
func
;
var_t
*
var
;
msft_typeinfo_t
*
msft_typeinfo
;
...
...
@@ -1970,7 +1970,7 @@ static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinte
/* count the no of methods, as the variable indices come after the funcs */
if
(
dispinterface
->
details
.
iface
->
disp_methods
)
LIST_FOR_EACH_ENTRY
(
func
,
dispinterface
->
details
.
iface
->
disp_methods
,
const
func
_t
,
entry
)
LIST_FOR_EACH_ENTRY
(
func
,
dispinterface
->
details
.
iface
->
disp_methods
,
var
_t
,
entry
)
idx
++
;
if
(
type_dispiface_get_props
(
dispinterface
))
...
...
@@ -1980,8 +1980,8 @@ static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinte
if
(
type_dispiface_get_methods
(
dispinterface
))
{
idx
=
0
;
LIST_FOR_EACH_ENTRY
(
func
,
type_dispiface_get_methods
(
dispinterface
),
const
func
_t
,
entry
)
if
(
add_func_desc
(
msft_typeinfo
,
func
->
def
,
idx
)
==
S_OK
)
LIST_FOR_EACH_ENTRY
(
func
,
type_dispiface_get_methods
(
dispinterface
),
var
_t
,
entry
)
if
(
add_func_desc
(
msft_typeinfo
,
func
,
idx
)
==
S_OK
)
idx
++
;
}
}
...
...
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