[PATCH][BZ #18441] fix sorting multibyte charsets with an improper locale
Ondřej Bílka
neleai@seznam.cz
Mon Jun 29 10:32:00 GMT 2015
On Sat, Jun 27, 2015 at 10:07:17PM +0200, Andreas Schwab wrote:
> OndÅej BÃlka <neleai@seznam.cz> writes:
>
> > *((uint16_t *) runp->mbs)
> > (index << 12) ^ *((uint16_t *) (runp->mbs+1));
>
> Either of these will be unaligned.
>
Which as its used to index array of size 256 * 256 is what we want.
But now I see that I didn't wrote what I meant as second could be
larger, If you want to add index into hash function I would add it as
below as high bits are unlikely to change, like following
(index << 4) ^ *((uint16_t *) (runp->mbs+1))
More information about the Libc-alpha
mailing list