Changeset 13041 in project


Ignore:
Timestamp:
01/20/09 22:44:55 (11 years ago)
Author:
felix winkelmann
Message:

default inlined character-cae operations use lowest 8 bit only (caused bug reported by Peter Bex)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/chicken.h

    r12940 r13041  
    988988#define C_i_structurep(x, s)            C_mk_bool(!C_immediatep(x) && C_header_bits(x) == C_STRUCTURE_TYPE && C_block_item(x, 0) == (s))
    989989
    990 #define C_u_i_char_alphabeticp(x)       C_mk_bool(C_isalpha(C_character_code(x)))
    991 #define C_u_i_char_numericp(x)          C_mk_bool(C_isdigit(C_character_code(x)))
    992 #define C_u_i_char_whitespacep(x)       C_mk_bool(C_isspace(C_character_code(x)))
    993 #define C_u_i_char_upper_casep(x)       C_mk_bool(C_isupper(C_character_code(x)))
    994 #define C_u_i_char_lower_casep(x)       C_mk_bool(C_islower(C_character_code(x)))
    995 
    996 #define C_u_i_char_upcase(x)            C_make_character(C_toupper(C_character_code(x)))
    997 #define C_u_i_char_downcase(x)          C_make_character(C_tolower(C_character_code(x)))
     990#define C_u_i_char_alphabeticp(x)       C_mk_bool(C_isalpha(C_character_code(x) & 0xff))
     991#define C_u_i_char_numericp(x)          C_mk_bool(C_isdigit(C_character_code(x) & 0xff))
     992#define C_u_i_char_whitespacep(x)       C_mk_bool(C_isspace(C_character_code(x) & 0xff))
     993#define C_u_i_char_upper_casep(x)       C_mk_bool(C_isupper(C_character_code(x) & 0xff))
     994#define C_u_i_char_lower_casep(x)       C_mk_bool(C_islower(C_character_code(x) & 0xff))
     995
     996#define C_u_i_char_upcase(x)            C_make_character(C_toupper(C_character_code(x) & 0xff))
     997#define C_u_i_char_downcase(x)          C_make_character(C_tolower(C_character_code(x) & 0xff))
    998998
    999999#define C_i_list_ref(lst, i)            C_i_car(C_i_list_tail(lst, i))
Note: See TracChangeset for help on using the changeset viewer.