Differences From Artifact [907d6adb03]:
- File src/OFObject+KeyValueCoding.m — part of check-in [d0ae3bfd6c] at 2020-10-25 23:33:09 on branch trunk — Add of_{malloc,calloc,realloc,free} (user: js, size: 6816) [annotate] [blame] [check-ins using]
To 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]
︙ | ︙ | |||
56 57 58 59 60 61 62 | memcpy(name + 2, key.UTF8String, keyLength); name[keyLength + 2] = '\0'; name[2] = of_ascii_toupper(name[2]); selector = sel_registerName(name); } @finally { | | | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | memcpy(name + 2, key.UTF8String, keyLength); name[keyLength + 2] = '\0'; name[2] = of_ascii_toupper(name[2]); selector = sel_registerName(name); } @finally { free(name); } methodSignature = [self methodSignatureForSelector: selector]; if (methodSignature == NULL) { objc_autoreleasePoolPop(pool); return [self valueForUndefinedKey: key]; |
︙ | ︙ | |||
168 169 170 171 172 173 174 | memcpy(name + 3, key.UTF8String, keyLength); memcpy(name + keyLength + 3, ":", 2); name[3] = of_ascii_toupper(name[3]); selector = sel_registerName(name); } @finally { | | | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | memcpy(name + 3, key.UTF8String, keyLength); memcpy(name + keyLength + 3, ":", 2); name[3] = of_ascii_toupper(name[3]); selector = sel_registerName(name); } @finally { free(name); } methodSignature = [self methodSignatureForSelector: selector]; if (methodSignature == nil || methodSignature.numberOfArguments != 3 || *methodSignature.methodReturnType != 'v' || |
︙ | ︙ |