Index: src/OFMethodSignature.m ================================================================== --- src/OFMethodSignature.m +++ src/OFMethodSignature.m @@ -40,11 +40,11 @@ assert(*length > 0); (*type)++; (*length)--; - while (*length > 0 && isdigit(**type)) { + while (*length > 0 && of_ascii_isdigit(**type)) { (*type)++; (*length)--; } align = alignofEncoding(type, length, true); @@ -292,11 +292,11 @@ assert(*length > 0); (*type)++; (*length)--; - while (*length > 0 && isdigit(**type)) { + while (*length > 0 && of_ascii_isdigit(**type)) { count = count * 10 + **type - '0'; (*type)++; (*length)--; } @@ -605,11 +605,11 @@ _offsets = [[OFMutableData alloc] initWithItemSize: sizeof(size_t)]; last = _types; for (size_t i = 0; i < length; i++) { - if (isdigit(_types[i])) { + if (of_ascii_isdigit(_types[i])) { size_t offset = _types[i] - '0'; if (last == _types + i) @throw [OFInvalidFormatException exception]; @@ -616,11 +616,12 @@ _types[i] = '\0'; [_typesPointers addItem: &last]; i++; - for (; i < length && isdigit(_types[i]); i++) + for (; i < length && + of_ascii_isdigit(_types[i]); i++) offset = offset * 10 + _types[i] - '0'; [_offsets addItem: &offset]; last = _types + i; Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -828,15 +828,21 @@ static OF_INLINE bool of_ascii_isalpha(char c) { return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')); } + +static OF_INLINE bool +of_ascii_isdigit(char c) +{ + return (c >= '0' && c <= '9'); +} static OF_INLINE bool of_ascii_isalnum(char c) { - return (of_ascii_isalpha(c) || (c >= '0' && c <= '9')); + return (of_ascii_isalpha(c) || of_ascii_isdigit(c)); } static OF_INLINE bool of_ascii_isspace(char c) {