Dmitry Timoshkov : widl: Generate header macros even for aggregate return methods.

Alexandre Julliard julliard at winehq.org
Wed Nov 15 16:46:00 CST 2017


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Tue Nov 14 10:29:38 2017 +0800

widl: Generate header macros even for aggregate return methods.

A generated macro has a clear suggestion what to do (#define WIDL_C_INLINE_WRAPPERS)
instead of completely omitting the macro and leaving one wondering what is going on.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/widl/header.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/widl/header.c b/tools/widl/header.c
index b5fe232..9f92127 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -960,7 +960,7 @@ static void write_method_macro(FILE *header, const type_t *iface, const type_t *
     if (is_override_method(iface, child, func))
       continue;
 
-    if (!is_callas(func->attrs) && !is_aggregate_return(func)) {
+    if (!is_callas(func->attrs)) {
       const var_t *arg;
 
       fprintf(header, "#define %s_%s(This", name, get_name(func));
@@ -969,6 +969,12 @@ static void write_method_macro(FILE *header, const type_t *iface, const type_t *
               fprintf(header, ",%s", arg->name);
       fprintf(header, ") ");
 
+      if (is_aggregate_return(func))
+      {
+        fprintf(header, "%s_%s_define_WIDL_C_INLINE_WRAPPERS_for_aggregate_return_support\n", name, get_name(func));
+        continue;
+      }
+
       fprintf(header, "(This)->lpVtbl->%s(This", get_vtbl_entry_name(iface, func));
       if (type_get_function_args(func->type))
           LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry )




More information about the wine-cvs mailing list