Differences From Artifact [5bbbc65fa4]:
- File
src/OFIntrospection.m
— part of check-in
[09a0d12bae]
at
2016-06-05 21:17:57
on branch trunk
— Always cast to unsigned char for to{upper,lower}()
This is required as passing something signed to it is an error on
NetBSD, but passing anything else than a char is undefined on Linux. (user: js, size: 12637) [annotate] [blame] [check-ins using]
To Artifact [0aa9a039cb]:
- File
src/OFIntrospection.m
— part of check-in
[d9eb7b50b3]
at
2017-01-07 00:37:26
on branch trunk
— Add of_ascii_{to{upper,lower},is{alpha,alnum}}
These are independent of the locale and work on the ASCII character set.
Unlike the C ones, these are 8-bit safe, meaning if a character > 0x7F
is passed, is{alpha,alnum} returns false and to{upper,lower} returns the
original character. (user: js, size: 12600) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
272 273 274 275 276 277 278 | _getter = [_name copy]; if ((_attributes & OF_PROPERTY_READWRITE) && _setter == nil) { of_unichar_t first = [_name characterAtIndex: 0]; OFMutableString *tmp = [_name mutableCopy]; _setter = tmp; | < | | < < | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | _getter = [_name copy]; if ((_attributes & OF_PROPERTY_READWRITE) && _setter == nil) { of_unichar_t first = [_name characterAtIndex: 0]; OFMutableString *tmp = [_name mutableCopy]; _setter = tmp; [tmp setCharacter: of_ascii_toupper(first) atIndex: 0]; [tmp prependString: @"set"]; [tmp makeImmutable]; } } @catch (id e) { [self release]; @throw e; |
︙ | ︙ |