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
82b7eecf
Commit
82b7eecf
authored
Feb 06, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Use the correct type offset when freeing proxy variables.
parent
936455ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
proxy.c
tools/widl/proxy.c
+11
-10
No files found.
tools/widl/proxy.c
View file @
82b7eecf
...
@@ -191,10 +191,9 @@ static void proxy_check_pointers( const var_list_t *args )
...
@@ -191,10 +191,9 @@ static void proxy_check_pointers( const var_list_t *args )
}
}
}
}
static
void
free_variable
(
const
var_t
*
arg
)
static
void
free_variable
(
const
var_t
*
arg
,
unsigned
int
type_offset
)
{
{
var_t
*
constraint
;
var_t
*
constraint
;
int
index
=
0
;
/* FIXME */
type_t
*
type
;
type_t
*
type
;
expr_list_t
*
expr
;
expr_list_t
*
expr
;
...
@@ -202,11 +201,11 @@ static void free_variable( const var_t *arg )
...
@@ -202,11 +201,11 @@ static void free_variable( const var_t *arg )
if
(
expr
)
if
(
expr
)
{
{
const
expr_t
*
size
=
LIST_ENTRY
(
list_head
(
expr
),
const
expr_t
,
entry
);
const
expr_t
*
size
=
LIST_ENTRY
(
list_head
(
expr
),
const
expr_t
,
entry
);
print_proxy
(
"_StubMsg.MaxCount = "
,
arg
->
name
);
print_proxy
(
"_StubMsg.MaxCount = "
);
write_expr
(
proxy
,
size
,
0
);
write_expr
(
proxy
,
size
,
0
);
fprintf
(
proxy
,
";
\n\n
"
);
fprintf
(
proxy
,
";
\n\n
"
);
print_proxy
(
"NdrClearOutParameters( &_StubMsg, "
);
print_proxy
(
"NdrClearOutParameters( &_StubMsg, "
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%
d], "
,
index
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%
u], "
,
type_offset
);
fprintf
(
proxy
,
"(void*)%s );
\n
"
,
arg
->
name
);
fprintf
(
proxy
,
"(void*)%s );
\n
"
,
arg
->
name
);
return
;
return
;
}
}
...
@@ -232,7 +231,7 @@ static void free_variable( const var_t *arg )
...
@@ -232,7 +231,7 @@ static void free_variable( const var_t *arg )
if
(
constraint
)
if
(
constraint
)
print_proxy
(
"_StubMsg.MaxCount = (unsigned long) ( %s );
\n
"
,
constraint
->
name
);
print_proxy
(
"_StubMsg.MaxCount = (unsigned long) ( %s );
\n
"
,
constraint
->
name
);
print_proxy
(
"NdrClearOutParameters( &_StubMsg, "
);
print_proxy
(
"NdrClearOutParameters( &_StubMsg, "
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%
d], "
,
index
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%
u], "
,
type_offset
);
fprintf
(
proxy
,
"(void*)%s );
\n
"
,
arg
->
name
);
fprintf
(
proxy
,
"(void*)%s );
\n
"
,
arg
->
name
);
break
;
break
;
...
@@ -241,7 +240,7 @@ static void free_variable( const var_t *arg )
...
@@ -241,7 +240,7 @@ static void free_variable( const var_t *arg )
}
}
}
}
static
void
proxy_free_variables
(
var_list_t
*
args
)
static
void
proxy_free_variables
(
var_list_t
*
args
,
unsigned
int
type_offset
)
{
{
const
var_t
*
arg
;
const
var_t
*
arg
;
...
@@ -250,9 +249,10 @@ static void proxy_free_variables( var_list_t *args )
...
@@ -250,9 +249,10 @@ static void proxy_free_variables( var_list_t *args )
{
{
if
(
is_attr
(
arg
->
attrs
,
ATTR_OUT
))
if
(
is_attr
(
arg
->
attrs
,
ATTR_OUT
))
{
{
free_variable
(
arg
);
free_variable
(
arg
,
type_offset
);
fprintf
(
proxy
,
"
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
}
}
type_offset
+=
get_size_typeformatstring_var
(
arg
);
}
}
}
}
...
@@ -301,7 +301,7 @@ static void gen_proxy(type_t *iface, const func_t *cur, int idx,
...
@@ -301,7 +301,7 @@ static void gen_proxy(type_t *iface, const func_t *cur, int idx,
print_proxy
(
"NdrProxyGetBuffer(This, &_StubMsg);
\n
"
);
print_proxy
(
"NdrProxyGetBuffer(This, &_StubMsg);
\n
"
);
offset
=
*
type_offset
;
offset
=
*
type_offset
;
write_remoting_arguments
(
proxy
,
indent
,
cur
,
type_
offset
,
PASS_IN
,
PHASE_MARSHAL
);
write_remoting_arguments
(
proxy
,
indent
,
cur
,
&
offset
,
PASS_IN
,
PHASE_MARSHAL
);
print_proxy
(
"NdrProxySendReceive(This, &_StubMsg);
\n
"
);
print_proxy
(
"NdrProxySendReceive(This, &_StubMsg);
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
...
@@ -314,7 +314,8 @@ static void gen_proxy(type_t *iface, const func_t *cur, int idx,
...
@@ -314,7 +314,8 @@ static void gen_proxy(type_t *iface, const func_t *cur, int idx,
indent
--
;
indent
--
;
fprintf
(
proxy
,
"
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
write_remoting_arguments
(
proxy
,
indent
,
cur
,
&
offset
,
PASS_OUT
,
PHASE_UNMARSHAL
);
offset
=
*
type_offset
;
write_remoting_arguments
(
proxy
,
indent
,
cur
,
type_offset
,
PASS_OUT
,
PHASE_UNMARSHAL
);
if
(
has_ret
)
if
(
has_ret
)
print_phase_basetype
(
proxy
,
indent
,
PHASE_UNMARSHAL
,
PASS_RETURN
,
def
,
"_RetVal"
);
print_phase_basetype
(
proxy
,
indent
,
PHASE_UNMARSHAL
,
PASS_RETURN
,
def
,
"_RetVal"
);
...
@@ -334,7 +335,7 @@ static void gen_proxy(type_t *iface, const func_t *cur, int idx,
...
@@ -334,7 +335,7 @@ static void gen_proxy(type_t *iface, const func_t *cur, int idx,
print_proxy
(
"{
\n
"
);
print_proxy
(
"{
\n
"
);
if
(
has_ret
)
{
if
(
has_ret
)
{
indent
++
;
indent
++
;
proxy_free_variables
(
cur
->
args
);
proxy_free_variables
(
cur
->
args
,
offset
);
print_proxy
(
"_RetVal = NdrProxyErrorHandler(RpcExceptionCode());
\n
"
);
print_proxy
(
"_RetVal = NdrProxyErrorHandler(RpcExceptionCode());
\n
"
);
indent
--
;
indent
--
;
}
}
...
...
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