mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
(SCM_CHARSET_GET): Cast IDX to unsigned char so that it works for
8-bit characters. Thanks to Matthias Koeppe! No, make that "Köppe".
This commit is contained in:
parent
08827276f6
commit
45b2947945
1 changed files with 3 additions and 3 deletions
|
@ -48,15 +48,15 @@
|
|||
|
||||
#define SCM_CHARSET_SIZE 256
|
||||
|
||||
/* We expect 8-bit bytes here. Shoule be no problem in the year
|
||||
/* We expect 8-bit bytes here. Should be no problem in the year
|
||||
2001. */
|
||||
#ifndef SCM_BITS_PER_LONG
|
||||
# define SCM_BITS_PER_LONG (sizeof (long) * 8)
|
||||
#endif
|
||||
|
||||
#define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\
|
||||
[(idx) / SCM_BITS_PER_LONG] &\
|
||||
(1L << ((idx) % SCM_BITS_PER_LONG)))
|
||||
[((unsigned char) (idx)) / SCM_BITS_PER_LONG] &\
|
||||
(1L << (((unsigned char) (idx)) % SCM_BITS_PER_LONG)))
|
||||
|
||||
#define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue