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
809810eb
Commit
809810eb
authored
Jun 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Use NdrPointerFree instead of freeing by hand where possible.
parent
a57f2b2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
typegen.c
tools/widl/typegen.c
+16
-8
No files found.
tools/widl/typegen.c
View file @
809810eb
...
...
@@ -4189,19 +4189,18 @@ 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
)
{
if
(
pointer_type
==
RPC_FC_RP
&&
phase
==
PHASE_FREE
&&
/* strings returned are assumed to be global and hence don't
* need freeing */
if
(
is_declptr
(
type
)
&&
!
(
phase
==
PHASE_FREE
&&
pass
==
PASS_RETURN
))
print_phase_function
(
file
,
indent
,
"Pointer"
,
local_var_prefix
,
phase
,
var
,
start_offset
);
else
if
(
pointer_type
==
RPC_FC_RP
&&
phase
==
PHASE_FREE
&&
!
in_attr
&&
is_conformant_array
(
type
))
{
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
);
}
/* strings returned are assumed to be global and hence don't
* need freeing */
else
if
(
is_declptr
(
type
)
&&
!
(
phase
==
PHASE_FREE
&&
pass
==
PASS_RETURN
))
print_phase_function
(
file
,
indent
,
"Pointer"
,
local_var_prefix
,
phase
,
var
,
start_offset
);
}
else
{
...
...
@@ -4257,7 +4256,7 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
}
if
(
pointer_type
!=
RPC_FC_RP
)
array_type
=
"Pointer"
;
print_phase_function
(
file
,
indent
,
array_type
,
local_var_prefix
,
phase
,
var
,
start_offset
);
if
(
phase
==
PHASE_FREE
&&
pointer_type
==
RPC_FC_RP
)
{
/* these are all unmarshalled by allocating memory */
...
...
@@ -4266,11 +4265,20 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
((
tc
==
RPC_FC_SMVARRAY
||
tc
==
RPC_FC_LGVARRAY
)
&&
in_attr
)
||
(
tc
==
RPC_FC_CARRAY
&&
!
in_attr
))
{
if
(
type_array_is_decl_as_ptr
(
type
)
&&
type
->
details
.
array
.
ptr_tfsoff
)
{
print_phase_function
(
file
,
indent
,
"Pointer"
,
local_var_prefix
,
phase
,
var
,
type
->
details
.
array
.
ptr_tfsoff
);
break
;
}
print_phase_function
(
file
,
indent
,
array_type
,
local_var_prefix
,
phase
,
var
,
start_offset
);
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
);
break
;
}
}
print_phase_function
(
file
,
indent
,
array_type
,
local_var_prefix
,
phase
,
var
,
start_offset
);
break
;
}
case
TGT_BASIC
:
...
...
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