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
977e15b7
Commit
977e15b7
authored
Sep 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Store the type format offset for function parameters in the variable object.
parent
e2a92702
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
15 deletions
+19
-15
proxy.c
tools/widl/proxy.c
+1
-1
typegen.c
tools/widl/typegen.c
+17
-14
widltypes.h
tools/widl/widltypes.h
+1
-0
No files found.
tools/widl/proxy.c
View file @
977e15b7
...
...
@@ -148,7 +148,7 @@ static int need_delegation_indirect(const type_t *iface)
static
void
free_variable
(
const
var_t
*
arg
,
const
char
*
local_var_prefix
)
{
unsigned
int
type_offset
=
arg
->
type
->
type
string_offset
;
unsigned
int
type_offset
=
arg
->
typestring_offset
;
type_t
*
type
=
arg
->
type
;
write_parameter_conf_or_var_exprs
(
proxy
,
indent
,
local_var_prefix
,
PHASE_FREE
,
arg
,
FALSE
);
...
...
tools/widl/typegen.c
View file @
977e15b7
...
...
@@ -966,7 +966,7 @@ static unsigned char get_parameter_fc( const var_t *var, int is_return, unsigned
*
flags
=
0
;
*
stack_size
=
get_stack_size
(
var
,
&
is_byval
);
*
typestring_offset
=
var
->
type
->
type
string_offset
;
*
typestring_offset
=
var
->
typestring_offset
;
if
(
is_in
)
*
flags
|=
IsIn
;
if
(
is_out
)
*
flags
|=
IsOut
;
...
...
@@ -1005,7 +1005,10 @@ static unsigned char get_parameter_fc( const var_t *var, int is_return, unsigned
*
flags
|=
MustFree
;
if
(
type_array_is_decl_as_ptr
(
var
->
type
)
&&
var
->
type
->
details
.
array
.
ptr_tfsoff
&&
get_pointer_fc
(
var
->
type
,
var
->
attrs
,
!
is_return
)
==
RPC_FC_RP
)
{
*
typestring_offset
=
var
->
type
->
typestring_offset
;
*
flags
|=
IsSimpleRef
;
}
break
;
case
TGT_STRING
:
*
flags
|=
MustFree
;
...
...
@@ -1207,12 +1210,12 @@ static unsigned int write_old_procformatstring_type(FILE *file, int indent, cons
}
else
{
unsigned
short
offset
=
var
->
type
->
type
string_offset
;
unsigned
short
offset
=
var
->
typestring_offset
;
if
(
is_interpreted
&&
is_array
(
var
->
type
)
&&
if
(
!
is_interpreted
&&
is_array
(
var
->
type
)
&&
type_array_is_decl_as_ptr
(
var
->
type
)
&&
var
->
type
->
details
.
array
.
ptr_tfsoff
)
offset
=
var
->
type
->
details
.
array
.
ptr_tfsoff
;
offset
=
var
->
type
->
typestring_offset
;
if
(
is_return
)
print_file
(
file
,
indent
,
"0x52, /* FC_RETURN_PARAM */
\n
"
);
...
...
@@ -3611,7 +3614,7 @@ static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *ty
static
unsigned
int
process_tfs_stmts
(
FILE
*
file
,
const
statement_list_t
*
stmts
,
type_pred_t
pred
,
unsigned
int
*
typeformat_offset
)
{
const
var_t
*
var
;
var_t
*
var
;
const
statement_t
*
stmt
;
if
(
stmts
)
LIST_FOR_EACH_ENTRY
(
stmt
,
stmts
,
const
statement_t
,
entry
)
...
...
@@ -3633,16 +3636,16 @@ static unsigned int process_tfs_stmts(FILE *file, const statement_list_t *stmts,
current_func
=
func
;
if
(
is_local
(
func
->
attrs
))
continue
;
if
(
!
is_void
(
type_function_get_rettype
(
func
->
type
)))
{
write_type_tfs
(
file
,
2
,
func
->
attrs
,
type_function_get_rettype
(
func
->
type
),
func
->
name
,
TYPE_CONTEXT_PARAM
,
typeformat_offset
);
}
var
=
type_function_get_retval
(
func
->
type
);
if
(
!
is_void
(
var
->
type
))
var
->
typestring_offset
=
write_type_tfs
(
file
,
2
,
func
->
attrs
,
var
->
type
,
func
->
name
,
TYPE_CONTEXT_PARAM
,
typeformat_offset
);
if
(
type_get_function_args
(
func
->
type
))
LIST_FOR_EACH_ENTRY
(
var
,
type_get_function_args
(
func
->
type
),
const
var_t
,
entry
)
write_type_tfs
(
file
,
2
,
var
->
attrs
,
var
->
type
,
var
->
name
,
TYPE_CONTEXT_TOPLEVELPARAM
,
typeformat_offset
);
LIST_FOR_EACH_ENTRY
(
var
,
type_get_function_args
(
func
->
type
),
var_t
,
entry
)
var
->
typestring_offset
=
write_type_tfs
(
file
,
2
,
var
->
attrs
,
var
->
type
,
var
->
name
,
TYPE_CONTEXT_TOPLEVELPARAM
,
typeformat_offset
);
}
}
...
...
@@ -4606,7 +4609,7 @@ void assign_stub_out_args( FILE *file, int indent, const var_t *func, const char
fprintf
(
file
,
" = NdrContextHandleInitialize(
\n
"
);
print_file
(
file
,
indent
+
1
,
"&__frame->_StubMsg,
\n
"
);
print_file
(
file
,
indent
+
1
,
"(PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%d]);
\n
"
,
var
->
type
->
type
string_offset
);
var
->
typestring_offset
);
break
;
case
TGT_ARRAY
:
if
(
type_array_has_conformance
(
var
->
type
))
...
...
tools/widl/widltypes.h
View file @
977e15b7
...
...
@@ -436,6 +436,7 @@ struct _var_t {
expr_t
*
eval
;
enum
storage_class
stgclass
;
unsigned
int
procstring_offset
;
unsigned
int
typestring_offset
;
struct
_loc_info_t
loc_info
;
...
...
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