comparison src/casefiddle.c @ 95328:44c693827736

(casify_object): Try to guess better whether the argument is a byte or a char.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 27 May 2008 00:50:01 +0000
parents 8971ddf55736
children e038c1a8307c
comparison
equal deleted inserted replaced
95327:257f10afe123 95328:44c693827736
55 It is not a real character. */ 55 It is not a real character. */
56 if ((unsigned) XFASTINT (obj) > (unsigned) flagbits) 56 if ((unsigned) XFASTINT (obj) > (unsigned) flagbits)
57 return obj; 57 return obj;
58 58
59 c1 = XFASTINT (obj) & ~flagbits; 59 c1 = XFASTINT (obj) & ~flagbits;
60 /* FIXME: Even if enable-multibyte-characters is nil, we may
61 manipulate multibyte chars. This means we have a bug for latin-1
62 chars since when we receive an int 128-255 we can't tell whether
63 it's an eight-bit byte or a latin-1 char. */
64 if (c1 >= 256)
65 multibyte = 1;
60 if (! multibyte) 66 if (! multibyte)
61 MAKE_CHAR_MULTIBYTE (c1); 67 MAKE_CHAR_MULTIBYTE (c1);
62 c = DOWNCASE (c1); 68 c = DOWNCASE (c1);
63 if (inword) 69 if (inword)
64 XSETFASTINT (obj, c | flags); 70 XSETFASTINT (obj, c | flags);