Module: wine Branch: master Commit: 148f184c236594ce6e47c9da386abae2eb2be27d URL: http://source.winehq.org/git/wine.git/?a=commit;h=148f184c236594ce6e47c9da38...
Author: Adam Petaccia adam@tpetaccia.com Date: Thu Jul 3 14:26:01 2008 -0400
gdiplus: test_getgenerics: Don't use a pointer-to-pointer construct.
---
dlls/gdiplus/tests/font.c | 24 ++++++++++-------------- 1 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 38d807b..2178c84 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -187,42 +187,38 @@ static void test_fontfamily (void) static void test_getgenerics (void) { GpStatus stat; - GpFontFamily** family; + GpFontFamily* family; WCHAR familyName[LF_FACESIZE]; ZeroMemory(familyName, sizeof(familyName)/sizeof(WCHAR));
- family = GdipAlloc (sizeof (GpFontFamily*)); - - stat = GdipGetGenericFontFamilySansSerif (family); + stat = GdipGetGenericFontFamilySansSerif (&family); expect (Ok, stat); - stat = GdipGetFamilyName (*family, familyName, LANG_NEUTRAL); + stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL); expect (Ok, stat); ok ((lstrcmpiW(familyName, MicrosoftSansSerif) == 0) || (lstrcmpiW(familyName,MSSansSerif) == 0), "Expected Microsoft Sans Serif or MS Sans Serif, got %s\n", debugstr_w(familyName)); - stat = GdipDeleteFontFamily (*family); + stat = GdipDeleteFontFamily (family); expect (Ok, stat);
- stat = GdipGetGenericFontFamilySerif (family); + stat = GdipGetGenericFontFamilySerif (&family); expect (Ok, stat); - stat = GdipGetFamilyName (*family, familyName, LANG_NEUTRAL); + stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL); expect (Ok, stat); ok (lstrcmpiW(familyName, TimesNewRoman) == 0, "Expected Times New Roman, got %s\n", debugstr_w(familyName)); - stat = GdipDeleteFontFamily (*family); + stat = GdipDeleteFontFamily (family); expect (Ok, stat);
- stat = GdipGetGenericFontFamilyMonospace (family); + stat = GdipGetGenericFontFamilyMonospace (&family); expect (Ok, stat); - stat = GdipGetFamilyName (*family, familyName, LANG_NEUTRAL); + stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL); expect (Ok, stat); ok (lstrcmpiW(familyName, CourierNew) == 0, "Expected Courier New, got %s\n", debugstr_w(familyName)); - stat = GdipDeleteFontFamily (*family); + stat = GdipDeleteFontFamily (family); expect (Ok, stat); - - GdipFree (family); }
START_TEST(font)