Alexandre Julliard : widl: Make sure format strings for structure and union types are only output once .

Alexandre Julliard julliard at winehq.org
Wed Nov 26 07:32:17 CST 2008


Module: wine
Branch: master
Commit: 0b7478a79fb0594daba5cee3c0288884c352ad39
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0b7478a79fb0594daba5cee3c0288884c352ad39

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Nov 25 21:47:47 2008 +0100

widl: Make sure format strings for structure and union types are only output once.

---

 tools/widl/typegen.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 45467e5..98145a7 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1864,8 +1864,9 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
            nothing is written to file yet.  On the actual writing pass,
            this will have been updated.  */
         unsigned int absoff = type->ptrdesc ? type->ptrdesc : *tfsoff;
-        short reloff = absoff - *tfsoff;
-        print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n",
+        int reloff = absoff - *tfsoff;
+        assert( reloff >= 0 );
+        print_file(file, 2, "NdrFcShort(0x%x),\t/* Offset= %d (%u) */\n",
                    reloff, reloff, absoff);
         *tfsoff += 2;
     }
@@ -2254,6 +2255,8 @@ static size_t write_typeformatstring_var(FILE *file, int indent, const func_t *f
         if (is_base_type(type->type))
             return 0;
 
+        if (processed(type)) return type->typestring_offset;
+
         switch (type->type)
         {
         case RPC_FC_STRUCT:




More information about the wine-cvs mailing list