WIDL: Fix updating the proc offset

Thomas Weidenmueller wine-patches at reactsoft.com
Sun Jun 18 12:45:50 CDT 2006


This patch fixes updating the proc offset in write_function_stubs().

- Thomas

-- 
P.S.: Please let me know if there's something wrong with this patch or
tell me why it was rejected. Otherwise I'm going to assume the fixes
aren't appreciated or necessary because the implementation is considered
mature and stable.
-------------- next part --------------
Index: tools/widl/client.c
===================================================================
RCS file: /home/wine/wine/tools/widl/client.c,v
retrieving revision 1.37
diff -u -r1.37 client.c
--- tools/widl/client.c	2 Jun 2006 09:56:44 -0000	1.37
+++ tools/widl/client.c	18 Jun 2006 17:43:09 -0000
@@ -271,14 +271,14 @@
             while (NEXT_LINK(var)) var = NEXT_LINK(var);
             while (var)
             {
-                proc_offset += get_size_procformatstring_var(var);
+                *proc_offset += get_size_procformatstring_var(var);
                 var = PREV_LINK(var);
             }
         }
         if (!is_void(def->type, NULL))
-            proc_offset += get_size_procformatstring_var(def);
+            *proc_offset += get_size_procformatstring_var(def);
         else
-            proc_offset += 2; /* FC_END and FC_PAD */
+            *proc_offset += 2; /* FC_END and FC_PAD */
 
         indent--;
         print_client("}\n");
Index: tools/widl/server.c
===================================================================
RCS file: /home/wine/wine/tools/widl/server.c,v
retrieving revision 1.44
diff -u -r1.44 server.c
--- tools/widl/server.c	14 Jun 2006 11:55:16 -0000	1.44
+++ tools/widl/server.c	18 Jun 2006 17:43:25 -0000
@@ -276,7 +276,7 @@
             print_server("NdrConvert(\n");
             indent++;
             print_server("(PMIDL_STUB_MESSAGE)&_StubMsg,\n");
-            print_server("(PFORMAT_STRING)&__MIDL_ProcFormatString.Format[%u]);\n", proc_offset);
+            print_server("(PFORMAT_STRING)&__MIDL_ProcFormatString.Format[%u]);\n", *proc_offset);
             indent -= 2;
             fprintf(server, "\n");
 
@@ -422,14 +422,14 @@
             while (NEXT_LINK(var)) var = NEXT_LINK(var);
             while (var)
             {
-                proc_offset += get_size_procformatstring_var(var);
+                *proc_offset += get_size_procformatstring_var(var);
                 var = PREV_LINK(var);
             }
         }
         if (!is_void(def->type, NULL))
-            proc_offset += get_size_procformatstring_var(def);
+            *proc_offset += get_size_procformatstring_var(def);
         else
-            proc_offset += 2; /* FC_END and FC_PAD */
+            *proc_offset += 2; /* FC_END and FC_PAD */
 
         func = PREV_LINK(func);
     }


More information about the wine-patches mailing list