Generate code without L-value casts.

svn path=/trunk/; revision=14237
This commit is contained in:
Filip Navara 2005-03-20 21:35:12 +00:00
parent 86a52339fb
commit 17a549a975
3 changed files with 19 additions and 2 deletions

View file

@ -1,5 +1,12 @@
ChangeLog ChangeLog
2005-03-20 navaraf
tools/widl/client.c
tools/widl/server.c
Generate code without L-value casts.
2005-03-20 ekohl 2005-03-20 ekohl
tools/widl/client.c tools/widl/client.c

View file

@ -510,6 +510,9 @@ static void marshall_in_arguments(func_t *func, unsigned int *type_offset)
fprintf(client, "*"); fprintf(client, "*");
write_name(client, var); write_name(client, var);
fprintf(client, ";\n"); fprintf(client, ";\n");
print_client("_StubMsg.Buffer += sizeof(");
write_type(client, var->type, NULL, var->tname);
fprintf(client, ");\n");
fprintf(client, "\n"); fprintf(client, "\n");
last_size = size; last_size = size;

View file

@ -639,9 +639,13 @@ static void marshall_out_arguments(func_t *func)
fprintf(server, "\n"); fprintf(server, "\n");
print_server("*(("); print_server("*((");
write_type(server, var->type, NULL, var->tname); write_type(server, var->type, NULL, var->tname);
fprintf(server, " __RPC_FAR *)_StubMsg.Buffer)++ = *"); fprintf(server, " __RPC_FAR *)_StubMsg.Buffer) = *");
write_name(server, var); write_name(server, var);
fprintf(server, ";\n"); fprintf(server, ";\n");
print_server("_StubMsg.Buffer += sizeof(");
write_type(server, var->type, NULL, var->tname);
fprintf(server, ");");
} }
else else
{ {
@ -692,7 +696,10 @@ static void marshall_out_arguments(func_t *func)
print_server("_StubMsg.Buffer += %u;\n", alignment); print_server("_StubMsg.Buffer += %u;\n", alignment);
print_server("*(("); print_server("*((");
write_type(server, def->type, def, def->tname); write_type(server, def->type, def, def->tname);
fprintf(server, " __RPC_FAR *)_StubMsg.Buffer)++ = _RetVal;\n"); fprintf(server, " __RPC_FAR *)_StubMsg.Buffer) = _RetVal;\n");
print_server("_StubMsg.Buffer += sizeof(");
write_type(server, def->type, def, def->tname);
fprintf(server, ");\n");
} }
} }