Rob Shearman : widl: Fix writing of MaxCount expressions for conformant strings declared using array form .

Alexandre Julliard julliard at winehq.org
Tue Mar 23 12:12:49 CDT 2010


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

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Tue Mar 23 13:33:17 2010 +0000

widl: Fix writing of MaxCount expressions for conformant strings declared using array form.

---

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

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 155e01b..771cd2a 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -3305,7 +3305,8 @@ expr_t *get_size_is_expr(const type_t *t, const char *name)
     expr_t *x = NULL;
 
     for ( ; is_array(t); t = type_array_get_element(t))
-        if (type_array_has_conformance(t))
+        if (type_array_has_conformance(t) &&
+            type_array_get_conformance(t)->type != EXPR_VOID)
         {
             if (!x)
                 x = type_array_get_conformance(t);
@@ -3330,7 +3331,8 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char
         case TGT_ARRAY:
             if (is_conformance_needed_for_phase(phase))
             {
-                if (type_array_has_conformance(type))
+                if (type_array_has_conformance(type) &&
+                    type_array_get_conformance(type)->type != EXPR_VOID)
                 {
                     print_file(file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR)");
                     write_expr(file, type_array_get_conformance(type), 1, 1, NULL, NULL, local_var_prefix);




More information about the wine-cvs mailing list