Differences From Artifact [3be7f2e37d]:
- File
src/OFValue.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: 6176) [annotate] [blame] [check-ins using] [more...]
To Artifact [fcc7bff050]:
- File
src/OFValue.m
— part of check-in
[627511b032]
at
2020-11-14 12:23:55
on branch trunk
— Rename of_malloc and of_calloc
The new names should be more accurate. (user: js, size: 6172) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
179 180 181 182 183 184 185 | objCType = self.objCType; if (strcmp([object objCType], objCType) != 0) return false; size = of_sizeof_type_encoding(objCType); | | | | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | objCType = self.objCType; if (strcmp([object objCType], objCType) != 0) return false; size = of_sizeof_type_encoding(objCType); value = of_alloc(1, size); @try { otherValue = of_alloc(1, size); } @catch (id e) { free(value); @throw e; } @try { [self getValue: value |
︙ | ︙ | |||
208 209 210 211 212 213 214 | - (unsigned long)hash { size_t size = of_sizeof_type_encoding(self.objCType); unsigned char *value; uint32_t hash; | | | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - (unsigned long)hash { size_t size = of_sizeof_type_encoding(self.objCType); unsigned char *value; uint32_t hash; value = of_alloc(1, size); @try { [self getValue: value size: size]; OF_HASH_INIT(hash); for (size_t i = 0; i < size; i++) |
︙ | ︙ | |||
309 310 311 312 313 314 315 | - (OFString *)description { OFMutableString *ret = [OFMutableString stringWithString: @"<OFValue: "]; size_t size = of_sizeof_type_encoding(self.objCType); unsigned char *value; | | | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - (OFString *)description { OFMutableString *ret = [OFMutableString stringWithString: @"<OFValue: "]; size_t size = of_sizeof_type_encoding(self.objCType); unsigned char *value; value = of_alloc(1, size); @try { [self getValue: value size: size]; for (size_t i = 0; i < size; i++) { if (i > 0) [ret appendString: @" "]; |
︙ | ︙ |