Overview
Comment: | OFCharacterSet_*: Make init unavailable |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
36607ff68e5a96d892b87c488227974f |
User & Date: | js on 2017-11-13 23:02:34 |
Other Links: | manifest | tags |
Context
2017-11-13
| ||
23:06 | macros.h: Reduce OF_INVALID_INIT_METHOD code size check-in: 1d41fff819 user: js tags: trunk | |
23:02 | OFCharacterSet_*: Make init unavailable check-in: 36607ff68e user: js tags: trunk | |
22:59 | Add -[OFCharacterSet invertedSet] check-in: 5b80a003bd user: js tags: trunk | |
Changes
Modified src/OFCharacterSet_bitset.m from [5c8e4572f4] to [b3c2f2baea].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + + | #import "OFCharacterSet_bitset.h" #import "OFString.h" #import "OFOutOfRangeException.h" @implementation OFCharacterSet_bitset - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithCharactersInString: (OFString *)string { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); const of_unichar_t *characters = [string characters]; |
︙ |
Modified src/OFCharacterSet_invertedSet.m from [66795d1b29] to [e0b3a32c5c].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + + | #import "OFCharacterSet_invertedSet.h" #import "OFString.h" #import "OFOutOfRangeException.h" @implementation OFCharacterSet_invertedSet - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)of_initWithCharacterSet: (OFCharacterSet *)characterSet { self = [super init]; _characterSet = [characterSet retain]; _characterIsMember = (bool (*)(id, SEL, of_unichar_t)) [_characterSet methodForSelector: @selector(characterIsMember:)]; |
︙ |
Modified src/OFCharacterSet_range.m from [53db2a4c2e] to [b96e56399e].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + + | #import "OFCharacterSet_range.h" #import "OFString.h" #import "OFOutOfRangeException.h" @implementation OFCharacterSet_range - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithRange: (of_range_t)range { self = [super init]; @try { if (SIZE_MAX - range.location < range.length) @throw [OFOutOfRangeException exception]; |
︙ |