Eric Kohl : widl: Fix proc offset calculation.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Mar 18 12:51:06 CST 2006
Module: wine
Branch: refs/heads/master
Commit: c7174f9fff45837f21b75c2b5d05d38f398a8e25
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c7174f9fff45837f21b75c2b5d05d38f398a8e25
Author: Eric Kohl <eric.kohl at t-online.de>
Date: Sat Mar 18 14:33:39 2006 +0100
widl: Fix proc offset calculation.
A void return type is represented by a FC_END/FC_PAD sequence in the
proc format string. Increment the proc offset by two when a function
returns void.
---
tools/widl/client.c | 2 ++
tools/widl/server.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/widl/client.c b/tools/widl/client.c
index 1dbbbc6..3197b73 100644
--- a/tools/widl/client.c
+++ b/tools/widl/client.c
@@ -252,6 +252,8 @@ static void write_function_stubs(type_t
}
if (!is_void(def->type, NULL))
proc_offset += get_size_procformatstring_var(def);
+ else
+ proc_offset += 2; /* FC_END and FC_PAD */
indent--;
print_client("}\n");
diff --git a/tools/widl/server.c b/tools/widl/server.c
index d1ea5f0..8cc33da 100644
--- a/tools/widl/server.c
+++ b/tools/widl/server.c
@@ -343,6 +343,8 @@ static void write_function_stubs(type_t
}
if (!is_void(def->type, NULL))
proc_offset += get_size_procformatstring_var(def);
+ else
+ proc_offset += 2; /* FC_END and FC_PAD */
func = PREV_LINK(func);
}
More information about the wine-cvs
mailing list