Differences From Artifact [b5a33b9502]:
- File
src/OFObject+KeyValueCoding.m
— part of check-in
[3d8286feee]
at
2020-11-04 23:18:25
on branch trunk
— Remove of_free()
While it makes sense to wrap malloc and calloc to replace the error
checking with exceptions, it does not make sense to wrap free. (user: js, size: 6810) [annotate] [blame] [check-ins using]
To Artifact [060fc086b7]:
- File
src/OFObject+KeyValueCoding.m
— part of check-in
[0ddaac3f5b]
at
2020-11-05 00:24:29
on branch trunk
— Avoid -[allocMemoryWithSize:] for temporary memory
-[allocMemoryWithSize:] has book keeping overhead that is unnecessary
for temporary memory. (user: js, size: 6810) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
46 47 48 49 50 51 52 | char *name; if ((keyLength = key.UTF8StringLength) < 1) { objc_autoreleasePoolPop(pool); return [self valueForUndefinedKey: key]; } | | | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | char *name; if ((keyLength = key.UTF8StringLength) < 1) { objc_autoreleasePoolPop(pool); return [self valueForUndefinedKey: key]; } name = of_malloc(keyLength + 3, 1); @try { memcpy(name, "is", 2); memcpy(name + 2, key.UTF8String, keyLength); name[keyLength + 2] = '\0'; name[2] = of_ascii_toupper(name[2]); |
︙ | ︙ | |||
158 159 160 161 162 163 164 | if ((keyLength = key.UTF8StringLength) < 1) { objc_autoreleasePoolPop(pool); [self setValue: value forUndefinedKey: key]; return; } | | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | if ((keyLength = key.UTF8StringLength) < 1) { objc_autoreleasePoolPop(pool); [self setValue: value forUndefinedKey: key]; return; } name = of_malloc(keyLength + 5, 1); @try { memcpy(name, "set", 3); memcpy(name + 3, key.UTF8String, keyLength); memcpy(name + keyLength + 3, ":", 2); name[3] = of_ascii_toupper(name[3]); |
︙ | ︙ |