diff options
author | Marius Vollmer <mvo@zagadka.de> | 2002-05-06 18:43:54 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2002-05-06 18:43:54 +0000 |
commit | 139e5cb2fb65ef64e6abdb8b7d80265940fb33f9 (patch) | |
tree | 2942e5a179b537fa3cbcbb68fb13f4bcc03f1b05 /srfi/srfi-14.h | |
parent | d47fd163a9b607d95cba2f2ac59b58ff853110e0 (diff) | |
download | guile-139e5cb2fb65ef64e6abdb8b7d80265940fb33f9.tar.gz |
(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".
Diffstat (limited to 'srfi/srfi-14.h')
-rw-r--r-- | srfi/srfi-14.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/srfi/srfi-14.h b/srfi/srfi-14.h index 816ef0aa3..d6155fa63 100644 --- a/srfi/srfi-14.h +++ b/srfi/srfi-14.h @@ -60,15 +60,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)) |