widl [1/2]: Fix redefinition of types in output (take 2)

Dan Hipschman dsh at linux.ucla.edu
Mon Jul 24 16:39:38 CDT 2006


On Mon, Jul 24, 2006 at 10:43:56PM +0200, Alexandre Julliard wrote:
> It seems somewhat cleaner to me to use the ignore flag to
> say that the type should not be output, instead of pretending that it
> has been written when actually it hasn't.

Fair enough.

ChangeLog:
* If a type is defined in an imported file, don't redefine it in the output
---
 tools/widl/header.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/widl/header.c b/tools/widl/header.c
index 2de2ca7..4cd599b 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -248,7 +248,7 @@ void write_type(FILE *h, type_t *t, cons
         break;
       case RPC_FC_ENUM16:
       case RPC_FC_ENUM32:
-        if (t->defined && !t->written) {
+        if (t->defined && !t->written && !t->ignore) {
           if (t->name) fprintf(h, "enum %s {\n", t->name);
           else fprintf(h, "enum {\n");
           t->written = TRUE;
@@ -274,7 +274,7 @@ void write_type(FILE *h, type_t *t, cons
       case RPC_FC_PSTRUCT:
       case RPC_FC_BOGUS_STRUCT:
       case RPC_FC_ENCAPSULATED_UNION:
-        if (t->defined && !t->written) {
+        if (t->defined && !t->written && !t->ignore) {
           if (t->name) fprintf(h, "struct %s {\n", t->name);
           else fprintf(h, "struct {\n");
           t->written = TRUE;
@@ -286,7 +286,7 @@ void write_type(FILE *h, type_t *t, cons
         else fprintf(h, "struct %s", t->name);
         break;
       case RPC_FC_NON_ENCAPSULATED_UNION:
-        if (t->defined && !t->written) {
+        if (t->defined && !t->written && !t->ignore) {
           if (t->name) fprintf(h, "union %s {\n", t->name);
           else fprintf(h, "union {\n");
           t->written = TRUE;



More information about the wine-patches mailing list