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
f170f9b5
Commit
f170f9b5
authored
Mar 07, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Output server code for freeing returned types.
parent
23673ca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
server.c
tools/widl/server.c
+3
-0
typegen.c
tools/widl/typegen.c
+15
-3
No files found.
tools/widl/server.c
View file @
f170f9b5
...
...
@@ -80,6 +80,9 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
indent
++
;
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_OUT
,
PHASE_FREE
);
if
(
!
is_void
(
type_function_get_rettype
(
func
->
type
)))
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_RETURN
,
PHASE_FREE
);
if
(
has_full_pointer
)
write_full_pointer_free
(
server
,
indent
,
func
);
...
...
tools/widl/typegen.c
View file @
f170f9b5
...
...
@@ -3349,9 +3349,14 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
if
(
phase
==
PHASE_FREE
||
pass
==
PASS_RETURN
||
pointer_type
!=
RPC_FC_RP
)
{
unsigned
int
ptr_start_offset
=
(
start_offset
-
(
is_conformant_array
(
type
)
?
4
:
2
));
print_phase_function
(
file
,
indent
,
"Pointer"
,
local_var_prefix
,
phase
,
var
,
ptr_start_offset
);
/* strings returned are assumed to be global and hence don't
* need freeing */
if
(
phase
!=
PHASE_FREE
||
pass
!=
PASS_RETURN
)
{
unsigned
int
ptr_start_offset
=
(
start_offset
-
(
is_conformant_array
(
type
)
?
4
:
2
));
print_phase_function
(
file
,
indent
,
"Pointer"
,
local_var_prefix
,
phase
,
var
,
ptr_start_offset
);
}
}
else
{
...
...
@@ -3493,6 +3498,13 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
* need a freeing pass */
if
(
phase
==
PHASE_MARSHAL
||
phase
==
PHASE_UNMARSHAL
)
struct_type
=
"SimpleStruct"
;
else
if
(
phase
==
PHASE_FREE
&&
pass
==
PASS_RETURN
)
{
print_file
(
file
,
indent
,
"if (%s%s)
\n
"
,
local_var_prefix
,
var
->
name
);
indent
++
;
print_file
(
file
,
indent
,
"__frame->_StubMsg.pfnFree(%s%s);
\n
"
,
local_var_prefix
,
var
->
name
);
indent
--
;
}
break
;
case
RPC_FC_PSTRUCT
:
struct_type
=
"SimpleStruct"
;
...
...
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