Differences From Artifact [a5bedf0289]:
- File src/OFBlock.m — part of check-in [13f4c6c678] at 2016-09-12 00:27:14 on branch trunk — Add OF_DEALLOC_UNSUPPORTED macro (user: js, size: 11160) [annotate] [blame] [check-ins using]
To Artifact [ec9702862e]:
- File
src/OFBlock.m
— part of check-in
[dbb706d21e]
at
2016-10-15 13:49:18
on branch trunk
— OFBlock: Set (*dst)->forwarding after memcpy()
Setting it before the memcpy() meant it was effectively a nop.
This also improves on the tests to catch this in the future. (user: js, size: 11160) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
257 258 259 260 261 262 263 | if ((*dst = malloc(src->size)) == NULL) { alloc_failed_exception.isa = [OFAllocFailedException class]; @throw (OFAllocFailedException*) &alloc_failed_exception; } | > > | < < | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | if ((*dst = malloc(src->size)) == NULL) { alloc_failed_exception.isa = [OFAllocFailedException class]; @throw (OFAllocFailedException*) &alloc_failed_exception; } memcpy(*dst, src, src->size); if (src == src->forwarding) (*dst)->forwarding = *dst; if (src->flags & OF_BLOCK_HAS_COPY_DISPOSE) src->byref_keep(*dst, src); } else *dst = src; (*dst)->flags++; |
︙ | ︙ |