Rob Shearman : widl: Call Pointer function for freeing non-conformant strings and for all phases for returned non-conformant strings , as is done for conformant strings.
Alexandre Julliard
julliard at winehq.org
Mon Feb 16 09:35:10 CST 2009
Module: wine
Branch: master
Commit: 04484a4013b87574a9f5ac577f57cab28d2fa84b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=04484a4013b87574a9f5ac577f57cab28d2fa84b
Author: Rob Shearman <robertshearman at gmail.com>
Date: Sat Feb 14 18:11:35 2009 +0000
widl: Call Pointer function for freeing non-conformant strings and for all phases for returned non-conformant strings, as is done for conformant strings.
Also call Pointer functions for any string that isn't a reference pointer.
---
tools/widl/typegen.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 5dd2cbe..f1a00e6 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -3146,14 +3146,19 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
}
else if (is_string_type(var->attrs, var->type))
{
- if (is_array(type) && !is_conformant_array(type))
- print_phase_function(file, indent, "NonConformantString", local_var_prefix,
- phase, var, start_offset);
+ 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);
+ }
else
{
- if (phase == PHASE_FREE || pass == PASS_RETURN || pointer_type == RPC_FC_UP)
- print_phase_function(file, indent, "Pointer", local_var_prefix, phase, var,
- start_offset - (is_conformant_array(type) ? 4 : 2));
+ if (is_array(type) && !is_conformant_array(type))
+ print_phase_function(file, indent, "NonConformantString",
+ local_var_prefix, phase, var,
+ start_offset);
else
print_phase_function(file, indent, "ConformantString", local_var_prefix,
phase, var, start_offset);
More information about the wine-cvs
mailing list