emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace XChar2b with unsigned in all font backends


From: Eli Zaretskii
Subject: Re: Replace XChar2b with unsigned in all font backends
Date: Mon, 20 May 2019 20:20:02 +0100
User-agent: K-9 Mail for Android

On May 20, 2019 7:29:34 PM GMT+01:00, Andy Moreton <address@hidden> wrote:
> On Mon 20 May 2019, Alex Gramiak wrote:
> 
> > Andy Moreton <address@hidden> writes:
> >
> >> Confirmed. This patch replaces use of XChar2b (a 16bit type) with
> >> unsigned (usually 32bit) which seems wrong.
> >>
> >>     AndyM
> >
> > I originally used unsigned short for this patch, but Eli[1] nudged
> me
> > towards unsigned. Unsigned fits better with other parts of the font
> > system, e.g., *encode_char returns unsigned, and *text_extents takes
> a
> > pointer to unsigned.
> >
> > [1]
> https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00457.html
> 
> Yes, but Eli was concerned with efficiency, but correctness comes
> first.
> If you are calling APIs that expect a pointer to an array of 16bit
> values, then an array of 32bit values will not suffice.
> 
> Many of the comments around this code talk of 2-byte values, so
> changing the code to use 4-byte values is surprising to the reader.
> 
> The changes also removed the explicit packing/unpacking of 16bit
> values,
> which may give rise to endianness issues on some systems.
> 
> Please revert this patch to fix the build on master, and then revisit
> these changes after that.
> 
>     AndyM

 You ask to revert because you don't think there's a way of fixing this without 
reverting?  Or fof some other reason?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]