Module: wine Branch: master Commit: dd68561c4a7ddef876f051b4af146c6c66568d93 URL: https://gitlab.winehq.org/wine/wine/-/commit/dd68561c4a7ddef876f051b4af146c6...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Mar 28 15:44:25 2024 +0100
widl: Fix method number for call_as functions.
---
tools/widl/header.h | 1 + tools/widl/proxy.c | 2 +- tools/widl/typegen.c | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/widl/header.h b/tools/widl/header.h index 045eb59b000..ae06d92bfa8 100644 --- a/tools/widl/header.h +++ b/tools/widl/header.h @@ -34,6 +34,7 @@ extern int needs_space_after(type_t *t); extern int is_object(const type_t *iface); extern int is_local(const attr_list_t *list); extern int count_methods(const type_t *iface); +extern const statement_t * get_callas_source(const type_t *iface, const var_t *def); extern int need_stub(const type_t *iface); extern int need_proxy(const type_t *iface); extern int need_inline_stubs(const type_t *iface); diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 8fed948d8de..30a4939ef5d 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -464,7 +464,7 @@ int count_methods(const type_t *iface) return count; }
-static const statement_t * get_callas_source(const type_t * iface, const var_t * def) +const statement_t *get_callas_source(const type_t *iface, const var_t *def) { const statement_t * source; STATEMENTS_FOR_EACH_FUNC( source, type_iface_get_stmts(iface)) { diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 2af08d87081..3658f779857 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1598,7 +1598,11 @@ static void write_iface_procformatstring(type_t *iface, FILE *file, int indent, STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) { var_t *func = stmt->u.var; - if (is_local(func->attrs)) continue; + if (is_local(func->attrs)) + { + if (!get_callas_source(iface, func)) count++; + continue; + } write_procformatstring_func( file, indent, iface, func, offset, count++ ); } }