Differences From Artifact [4f60753bfd]:
- File src/OFObject+KeyValueCoding.m — part of check-in [c7f0229795] at 2020-01-02 01:51:34 on branch trunk — Update copyright (user: js, size: 6996) [annotate] [blame] [check-ins using] [more...]
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]);
|
| ︙ | ︙ | |||
161 162 163 164 165 166 167 |
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]);
|
| ︙ | ︙ |