widl [2/2]: Make structs containing user types bogus; fix square_test_us test failure

Dan Hipschman dsh at linux.ucla.edu
Fri Oct 5 15:52:20 CDT 2007


This fixes the square_test_us test.  This test failure turned out to be
much simpler to fix than the one with the conformant arrays; if I had
known, I would have just done this one first.  The problem was that
structures with user types weren't being recognized as complex.  In this
case, that meant that the structure was block copied.

---
 dlls/rpcrt4/tests/server.c |    2 +-
 tools/widl/parser.y        |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index 7db9202..55da875 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -698,7 +698,7 @@ pointer_tests(void)
 
   ok(test_list_length(list) == 3, "RPC test_list_length\n");
   ok(square_puint(p1) == 121, "RPC square_puint\n");
-  todo_wine ok(square_test_us(&tus) == 121, "RPC square_test_us\n");
+  ok(square_test_us(&tus) == 121, "RPC square_test_us\n");
 
   pa[0] = &a[0];
   pa[1] = &a[1];
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 8799e89..ae7f8f1 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1740,6 +1740,9 @@ static int get_struct_type(var_list_t *fields)
   {
     type_t *t = field->type;
 
+    if (is_user_type(t))
+      return RPC_FC_BOGUS_STRUCT;
+
     if (is_ptr(t))
     {
         do



More information about the wine-patches mailing list