[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 1/4] gdiplus/tests: Add metafile playback test for EMR_RESTOREDC.
From:       "Shawn M. Chapla" <schapla () codeweavers ! com>
Date:       2020-06-30 15:13:42
Message-ID: 20200630151342.GC3053320 () cw ! chapla ! email
[Download RAW message or body]

On Tue, Jun 30, 2020 at 10:03:04AM -0500, Zebediah Figura wrote:
> On 6/30/20 9:58 AM, Shawn M. Chapla wrote:
> > On Mon, Jun 29, 2020 at 07:49:50PM -0500, Jeff Smith wrote:
> >>> +static void test_restoredc(void)
> >>> +{
> >>> +    static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
> >>> +    static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
> >>> +    static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0};
> >>
> >> As GDI+ is being built as a PE, it should be fine to remove 'description' ...
> >>
> >>> +    stat = GdipRecordMetafile(hdc, EmfTypeEmfOnly, &frame, MetafileFrameUnitPixel,
> >>> +        description, &metafile);
> >>
> >> and replace it here with L"winetest" (unless Esme has an objection).
> > 
> > I used `description` here to match the rest of the test functions in
> > this file and in a possibly misguided attempt to follow the guidelines
> > on the WineHQ Developer Hints wiki page [1]. So long as it isn't going
> > to cause any problems, I'm happy to use `L"winetest"` instead.
> > 
> > [1] https://wiki.winehq.org/Developer_Hints#Using_only_C89-compliant_code
> > 
> 
> Yeah, those guides are outdated, like much of what's on the wiki. The
> move to PE is recent, such that most files still contain explicitly
> spelled out WCHAR strings.
> 
> FYI, you can tell whether a module is built as PE by checking for the
> "-mno-cygwin" flag in its Makefile.in. All tests are also PE.
> 

That's very good to know. The explicitly spelled out WCHAR strings are
obviously no fun, so I'll make sure to avoid them (when appropriate) in
the future.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic