=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: oleaut32/tests: Don' t use autoheader styled defines in varformat.

Alexandre Julliard julliard at winehq.org
Wed Jun 26 16:40:31 CDT 2013


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Jun 26 00:21:14 2013 +0200

oleaut32/tests: Don't use autoheader styled defines in varformat.

---

 dlls/oleaut32/tests/varformat.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c
index 0354d19..8370d1d 100644
--- a/dlls/oleaut32/tests/varformat.c
+++ b/dlls/oleaut32/tests/varformat.c
@@ -44,11 +44,8 @@ static HRESULT (WINAPI *pVarFormatNumber)(LPVARIANT,int,int,int,int,ULONG,BSTR*)
 static HRESULT (WINAPI *pVarFormat)(LPVARIANT,LPOLESTR,int,int,ULONG,BSTR*);
 static HRESULT (WINAPI *pVarWeekdayName)(int,int,int,ULONG,BSTR*);
 
-/* Have I8/UI8 data type? */
-#define HAVE_OLEAUT32_I8      HAVE_FUNC(VarI8FromI1)
-
-/* Is a given function exported from oleaut32? */
-#define HAVE_FUNC(func) ((void*)GetProcAddress(hOleaut32, #func) != NULL)
+/* Has I8/UI8 data type? */
+static BOOL has_i8;
 
 /* Get a conversion function ptr, return if function not available */
 #define CHECKPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func); \
@@ -96,7 +93,7 @@ static void test_VarFormatNumber(void)
   FMT_NUMBER(VT_UI2, V_UI2);
   FMT_NUMBER(VT_I4, V_I4);
   FMT_NUMBER(VT_UI4, V_UI4);
-  if (HAVE_OLEAUT32_I8)
+  if (has_i8)
   {
     FMT_NUMBER(VT_I8, V_I8);
     FMT_NUMBER(VT_UI8, V_UI8);
@@ -278,7 +275,7 @@ static void test_VarFormat(void)
   VNUMFMT(VT_I1,V_I1);
   VNUMFMT(VT_I2,V_I2);
   VNUMFMT(VT_I4,V_I4);
-  if (HAVE_OLEAUT32_I8)
+  if (has_i8)
   {
     VNUMFMT(VT_I8,V_I8);
   }
@@ -286,7 +283,7 @@ static void test_VarFormat(void)
   VNUMFMT(VT_UI1,V_UI1);
   VNUMFMT(VT_UI2,V_UI2);
   VNUMFMT(VT_UI4,V_UI4);
-  if (HAVE_OLEAUT32_I8)
+  if (has_i8)
   {
     VNUMFMT(VT_UI8,V_UI8);
   }
@@ -565,6 +562,8 @@ START_TEST(varformat)
 {
   hOleaut32 = GetModuleHandleA("oleaut32.dll");
 
+  has_i8 = GetProcAddress(hOleaut32, "VarI8FromI1") != NULL;
+
   test_VarFormatNumber();
   test_VarFormat();
   test_VarWeekdayName();




More information about the wine-cvs mailing list