Francois Gouget : oleaut32: Fixed compilation in the nameless union case.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Oct 2 05:40:42 CDT 2006


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Fri Sep 29 12:52:22 2006 +0200

oleaut32: Fixed compilation in the nameless union case.

---

 dlls/oleaut32/tests/usrmarshal.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c
index 0b30ff3..2010d04 100644
--- a/dlls/oleaut32/tests/usrmarshal.c
+++ b/dlls/oleaut32/tests/usrmarshal.c
@@ -27,6 +27,12 @@ #include "propidl.h" /* for LPSAFEARRAY_
 
 #include "wine/test.h"
 
+#if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
+# define V_U2(A)  ((A)->n1.n2)
+#else
+# define V_U2(A)  (*(A))
+#endif
+
 /* doesn't work on Windows due to needing more of the
  * MIDL_STUB_MESSAGE structure to be filled out */
 #define LPSAFEARRAY_UNMARSHAL_WORKS 0
@@ -376,11 +382,11 @@ static void check_variant_header(DWORD *
     wp = (WORD*)wirev;
     ok(*wp == V_VT(v), "vt %04x expected %04x\n", *wp, V_VT(v));
     wp++;
-    ok(*wp == v->n1.n2.wReserved1, "res1 %04x expected %04x\n", *wp, v->n1.n2.wReserved1);
+    ok(*wp == V_U2(v).wReserved1, "res1 %04x expected %04x\n", *wp, V_U2(v).wReserved1);
     wp++;
-    ok(*wp == v->n1.n2.wReserved2, "res2 %04x expected %04x\n", *wp, v->n1.n2.wReserved2);
+    ok(*wp == V_U2(v).wReserved2, "res2 %04x expected %04x\n", *wp, V_U2(v).wReserved2);
     wp++;
-    ok(*wp == v->n1.n2.wReserved3, "res3 %04x expected %04x\n", *wp, v->n1.n2.wReserved3);
+    ok(*wp == V_U2(v).wReserved3, "res3 %04x expected %04x\n", *wp, V_U2(v).wReserved3);
     wp++;
     wirev = (DWORD*)wp;
     switch_is = V_VT(v);




More information about the wine-cvs mailing list