WIDL: Don't Output __RPC_FAR In Generated Code
Robert Shearman
rob at codeweavers.com
Sat Dec 10 00:03:10 CST 2005
Hans Leidekker wrote:
>On Friday 09 December 2005 20:21, Robert Shearman wrote:
>
>(note: I see no problem with this patch)
>
> print_server("*((");
> write_type(server, def->type, def, def->tname);
>- fprintf(server, " __RPC_FAR *)_StubMsg.Buffer)++ = _RetVal;\n");
>+ fprintf(server, " *)_StubMsg.Buffer)++ = _RetVal;\n");
>
>I remember sending a patch for the MIDL generated oleaut32/oaidl_p.c to
>remove all these lvalue casts that had become illegal with the arrival
>of gcc4 ("invalid lvalue in assignment"). To avoid these in widl the code
>could read something like this:
>
> print_server("*(");
> write_type(server, def->type, def, def->tname);
> fprintf(server, " *)_StubMsg.Buffer = _RetVal;\n");
> fprintf(server, "_StubMsg.Buffer += sizeof(");
> write_type(server, def->type, def, def->tname);
> fprintf(server, ");\n");
>
>I don't have my repository at hand now but I can send a patch this weekend.
>
I did plan to fix this in the future, but in reality the generated code
isn't of much use yet, even if it were to compile correctly as it only
accepts non-pointer basic types. Once the code becomes good enough for
us to generate code for the svcctl or winreg interfaces then we will
need touches like this.
--
Rob Shearman
More information about the wine-devel
mailing list