From: Huw Davies Subject: Re: [PATCH v3 3/4] gdi32: Introduce and use debugstr_face helper. Message-Id: <20200921090116.GC24050@merlot.physics.ox.ac.uk> Date: Mon, 21 Sep 2020 10:01:17 +0100 In-Reply-To: <20200917173045.1315058-3-rbernon@codeweavers.com> References: <20200917173045.1315058-1-rbernon@codeweavers.com> <20200917173045.1315058-3-rbernon@codeweavers.com> On Thu, Sep 17, 2020 at 07:30:44PM +0200, Rémi Bernon wrote: > Signed-off-by: Rémi Bernon > --- > dlls/gdi32/freetype.c | 42 ++++++++++++++++++++---------------------- > 1 file changed, 20 insertions(+), 22 deletions(-) > > diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c > index 86585882342..3298b31ab74 100644 > --- a/dlls/gdi32/freetype.c > +++ b/dlls/gdi32/freetype.c > @@ -288,6 +288,12 @@ typedef struct tagFace { > struct enum_data *cached_enum_data; > } Face; > > +static inline const char *debugstr_face( Face *face ) > +{ > + if (face->file) return wine_dbg_sprintf( "%s (%ld)", debugstr_w(face->file), face->face_index ); > + else return wine_dbg_sprintf( "%p-%p (%ld)", face->font_data_ptr, (char *)face->font_data_ptr + face->font_data_size, face->face_index ); > +} While this patch is fine in principle, I wonder whether the name of the helper is ideal. We might want a helper to dump the face's name, ppem, etc. at some point, so unless you're planning to extend this helper to do that, then something like debugstr_face_source() might be more appropriate. Huw.