Module: wine Branch: master Commit: 2e8dec4115b9058c0cdf096ba8bd7bb14128c028 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2e8dec4115b9058c0cdf096ba8...
Author: Rob Shearman robertshearman@gmail.com Date: Thu Sep 18 12:37:35 2008 +0100
widl: Don't automatically add DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions and structs.
It doesn't match what MIDL does.
---
tools/widl/header.c | 22 +--------------------- 1 files changed, 1 insertions(+), 21 deletions(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c index 0d9832d..83fef7f 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -150,28 +150,8 @@ static void write_field(FILE *h, var_t *v) { if (!v) return; if (v->type) { - const char *name = v->name; - if (name == NULL) { - switch (v->type->type) { - case RPC_FC_STRUCT: - case RPC_FC_CVSTRUCT: - case RPC_FC_CPSTRUCT: - case RPC_FC_CSTRUCT: - case RPC_FC_PSTRUCT: - case RPC_FC_BOGUS_STRUCT: - case RPC_FC_ENCAPSULATED_UNION: - name = "DUMMYSTRUCTNAME"; - break; - case RPC_FC_NON_ENCAPSULATED_UNION: - name = "DUMMYUNIONNAME"; - break; - default: - /* ? */ - break; - } - } indent(h, 0); - write_type_def_or_decl(h, v->type, TRUE, "%s", name); + write_type_def_or_decl(h, v->type, TRUE, "%s", v->name); fprintf(h, ";\n"); } }