[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11082: 24.0.94; u.glyphless member in struct glyph does not fit in 3
From: |
Kenichi Handa |
Subject: |
bug#11082: 24.0.94; u.glyphless member in struct glyph does not fit in 32 bits |
Date: |
Mon, 26 Mar 2012 14:47:16 +0900 |
In article <83zkb6trdb.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> > 447 /* Sub-stretch for type == GLYPHLESS_GLYPH. */
> > 448 struct
> > 449 {
> > 450 /* Value is an enum of the type glyphless_display_method.
> > */
> > 451 unsigned method : 2;
> > 452 /* 1 iff this glyph is for a character of no font. */
> > 453 unsigned for_no_font : 1;
> > 454 /* Length of acronym or hexadecimal code string (at most
> > 8). */
> > 455 unsigned len : 4;
> > 456 /* Character to display. Actually we need only 22 bits.
> > */
> > 457 unsigned ch : 26;
> > 458 } glyphless;
[...]
> > According to the comment above, it seems to be OK to shorten the
> > length of `u.glyphless.ch' member from 26 to 25. Could someone
> > confirm this?
> Confirmed. From the ELisp manual:
[...]
> I would actually suggest to use 22-bit for this field, to avoid
> confusion in the future.
I agree to change the bit length. I don't remeber well but I
think the current bit length setting was just my mistake.
In article <jwv4ntch6w6.fsf-monnier+emacs@gnu.org>, Stefan Monnier
<monnier@iro.umontreal.ca> writes:
> > dispextern.h (struct glyph): Change the bit length of glyphless.ch to 22
> > to make the member glyphless fit in 32 bits.
> I think it's safer to reduce it to 25 bits, otherwise `val' field will
> refer to undefined bits.
Ok. I've just installed that change.
---
Kenichi Handa
handa@m17n.org