Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0d76bb7e
Commit
0d76bb7e
authored
Jul 27, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Clear out more types of parameters in the proxy error handlers.
parent
8b73720d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
29 deletions
+13
-29
proxy.c
tools/widl/proxy.c
+3
-26
typegen.c
tools/widl/typegen.c
+8
-3
typegen.h
tools/widl/typegen.h
+2
-0
No files found.
tools/widl/proxy.c
View file @
0d76bb7e
...
...
@@ -147,20 +147,9 @@ 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
->
typestring_offset
;
expr_t
*
iid
;
type_t
*
type
=
arg
->
type
;
expr_t
*
size
=
get_size_is_expr
(
type
,
arg
->
name
);
if
(
size
)
{
print_proxy
(
"__frame->_StubMsg.MaxCount = "
);
write_expr
(
proxy
,
size
,
0
,
1
,
NULL
,
NULL
,
local_var_prefix
);
fprintf
(
proxy
,
";
\n\n
"
);
print_proxy
(
"NdrClearOutParameters( &__frame->_StubMsg, "
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%u], "
,
type_offset
);
fprintf
(
proxy
,
"(void*)%s );
\n
"
,
arg
->
name
);
return
;
}
write_parameter_conf_or_var_exprs
(
proxy
,
indent
,
local_var_prefix
,
PHASE_FREE
,
arg
,
FALSE
);
switch
(
typegen_detect_type
(
type
,
arg
->
attrs
,
TDT_IGNORE_STRINGS
))
{
...
...
@@ -174,23 +163,11 @@ static void free_variable( const var_t *arg, const char *local_var_prefix )
break
;
case
TGT_IFACE_POINTER
:
iid
=
get_attrp
(
arg
->
attrs
,
ATTR_IIDIS
);
if
(
iid
)
{
print_proxy
(
"__frame->_StubMsg.MaxCount = (ULONG_PTR) "
);
write_expr
(
proxy
,
iid
,
1
,
1
,
NULL
,
NULL
,
local_var_prefix
);
print_proxy
(
";
\n\n
"
);
}
/* fall through */
case
TGT_POINTER
:
if
(
get_pointer_fc
(
type
,
arg
->
attrs
,
TRUE
)
==
RPC_FC_FP
)
{
case
TGT_ARRAY
:
print_proxy
(
"NdrClearOutParameters( &__frame->_StubMsg, "
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%u], "
,
type_offset
);
fprintf
(
proxy
,
"(void*)%s );
\n
"
,
arg
->
name
);
}
else
print_proxy
(
"/* FIXME: %s code for %s type %d missing */
\n
"
,
__FUNCTION__
,
arg
->
name
,
type_get_type
(
type
)
);
fprintf
(
proxy
,
"(void *)%s );
\n
"
,
arg
->
name
);
break
;
default:
...
...
tools/widl/typegen.c
View file @
0d76bb7e
...
...
@@ -4035,8 +4035,8 @@ expr_t *get_size_is_expr(const type_t *t, const char *name)
return
x
;
}
static
void
write_parameter_conf_or_var_exprs
(
FILE
*
file
,
int
indent
,
const
char
*
local_var_prefix
,
enum
remoting_phase
phase
,
const
var_t
*
var
)
void
write_parameter_conf_or_var_exprs
(
FILE
*
file
,
int
indent
,
const
char
*
local_var_prefix
,
enum
remoting_phase
phase
,
const
var_t
*
var
,
int
valid_variance
)
{
const
type_t
*
type
=
var
->
type
;
/* get fundamental type for the argument */
...
...
@@ -4057,10 +4057,15 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char
if
(
type_array_has_variance
(
type
))
{
print_file
(
file
,
indent
,
"__frame->_StubMsg.Offset = 0;
\n
"
);
/* FIXME */
if
(
valid_variance
)
{
print_file
(
file
,
indent
,
"__frame->_StubMsg.ActualCount = (ULONG_PTR)"
);
write_expr
(
file
,
type_array_get_variance
(
type
),
1
,
1
,
NULL
,
NULL
,
local_var_prefix
);
fprintf
(
file
,
";
\n\n
"
);
}
else
print_file
(
file
,
indent
,
"__frame->_StubMsg.ActualCount = __frame->_StubMsg.MaxCount;
\n\n
"
);
}
}
break
;
case
TGT_UNION
:
...
...
@@ -4135,7 +4140,7 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
if
(
phase
==
PHASE_BUFFERSIZE
&&
get_required_buffer_size
(
var
,
&
alignment
,
pass
))
return
;
write_parameter_conf_or_var_exprs
(
file
,
indent
,
local_var_prefix
,
phase
,
var
);
write_parameter_conf_or_var_exprs
(
file
,
indent
,
local_var_prefix
,
phase
,
var
,
TRUE
);
switch
(
typegen_detect_type
(
type
,
var
->
attrs
,
TDT_ALL_TYPES
))
{
...
...
tools/widl/typegen.h
View file @
0d76bb7e
...
...
@@ -68,6 +68,8 @@ void write_typeformatstring(FILE *file, const statement_list_t *stmts, type_pred
void
write_procformatstring_offsets
(
FILE
*
file
,
const
type_t
*
iface
);
void
print_phase_basetype
(
FILE
*
file
,
int
indent
,
const
char
*
local_var_prefix
,
enum
remoting_phase
phase
,
enum
pass
pass
,
const
var_t
*
var
,
const
char
*
varname
);
void
write_parameter_conf_or_var_exprs
(
FILE
*
file
,
int
indent
,
const
char
*
local_var_prefix
,
enum
remoting_phase
phase
,
const
var_t
*
var
,
int
valid_variance
);
void
write_remoting_arguments
(
FILE
*
file
,
int
indent
,
const
var_t
*
func
,
const
char
*
local_var_prefix
,
enum
pass
pass
,
enum
remoting_phase
phase
);
unsigned
int
get_size_procformatstring_func
(
const
type_t
*
iface
,
const
var_t
*
func
);
...
...
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