Robert Shearman : widl:
Only write the buffer incrementing code for the marshaling and
unmarshaling phases .
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 31 13:04:56 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 96f6a22ece54672c9e232d388c803646daab5881
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=96f6a22ece54672c9e232d388c803646daab5881
Author: Robert Shearman <rob at codeweavers.com>
Date: Fri Mar 31 12:47:22 2006 +0100
widl: Only write the buffer incrementing code for the marshaling and unmarshaling phases.
Only write the buffer incrementing code for the marshaling and
unmarshaling phases - buffer sizing is handled elsewhere and freeing
isn't applicable.
---
tools/widl/typegen.c | 45 ++++++++++++++++++++++++---------------------
1 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 096173f..d31110a 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1704,30 +1704,33 @@ void write_remoting_arguments(FILE *file
size = 0;
}
- print_file(file, indent,
- "_StubMsg.Buffer = (unsigned char *)(((long)_StubMsg.Buffer + %u) & ~0x%x);\n",
- size - 1, size - 1);
-
- if (phase == PHASE_MARSHAL)
- {
- print_file(file, indent, "*(");
- write_type(file, var->type, NULL, var->tname);
- fprintf(file, " *)_StubMsg.Buffer = *");
- write_name(file, var);
- fprintf(file, ";\n");
- }
- else if (phase == PHASE_UNMARSHAL)
+ if (phase == PHASE_MARSHAL || phase == PHASE_UNMARSHAL)
{
- print_file(file, indent, (pass == PASS_IN) ? "" : "*");
- write_name(file, var);
- fprintf(file, (pass == PASS_IN) ? " = (" : " = *(");
+ print_file(file, indent,
+ "_StubMsg.Buffer = (unsigned char *)(((long)_StubMsg.Buffer + %u) & ~0x%x);\n",
+ size - 1, size - 1);
+
+ if (phase == PHASE_MARSHAL)
+ {
+ print_file(file, indent, "*(");
+ write_type(file, var->type, NULL, var->tname);
+ fprintf(file, " *)_StubMsg.Buffer = *");
+ write_name(file, var);
+ fprintf(file, ";\n");
+ }
+ else if (phase == PHASE_UNMARSHAL)
+ {
+ print_file(file, indent, (pass == PASS_IN) ? "" : "*");
+ write_name(file, var);
+ fprintf(file, (pass == PASS_IN) ? " = (" : " = *(");
+ write_type(file, var->type, NULL, var->tname);
+ fprintf(file, " *)_StubMsg.Buffer;\n");
+ }
+
+ print_file(file, indent, "_StubMsg.Buffer += sizeof(");
write_type(file, var->type, NULL, var->tname);
- fprintf(file, " *)_StubMsg.Buffer;\n");
+ fprintf(file, ");\n");
}
-
- print_file(file, indent, "_StubMsg.Buffer += sizeof(");
- write_type(file, var->type, NULL, var->tname);
- fprintf(file, ");\n");
}
else
{
More information about the wine-cvs
mailing list