Module: wine Branch: refs/heads/master Commit: 8d7fa4c013991d79068436121f7948d367cf0fef URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=8d7fa4c013991d7906843612...
Author: Robert Shearman rob@codeweavers.com Date: Tue Feb 7 12:30:23 2006 +0100
widl: Write out the correct FC type if the structure has pointers.
---
tools/widl/typegen.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 6bb2cae..a9c9473 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -966,7 +966,10 @@ static size_t write_struct_tfs(FILE *fil else pointer_offset = 0; /* silence warning */
start_offset = *typestring_offset; - WRITE_FCTYPE(file, FC_STRUCT, *typestring_offset); + if (type->type == RPC_FC_STRUCT) + WRITE_FCTYPE(file, FC_STRUCT, *typestring_offset); + else + WRITE_FCTYPE(file, FC_PSTRUCT, *typestring_offset); /* alignment */ print_file(file, 2, "0x0,\n"); /* total size */ @@ -1013,7 +1016,10 @@ static size_t write_struct_tfs(FILE *fil else pointer_offset = 0; /* silence warning */
start_offset = *typestring_offset; - WRITE_FCTYPE(file, FC_CSTRUCT, *typestring_offset); + if (type->type == RPC_FC_CSTRUCT) + WRITE_FCTYPE(file, FC_CSTRUCT, *typestring_offset); + else + WRITE_FCTYPE(file, FC_CPSTRUCT, *typestring_offset); /* alignment */ print_file(file, 2, "0x0,\n"); /* total size */