Differences From Artifact [a204e2796b]:
- File
src/OFBlock.m
— part of check-in
[417b213d41]
at
2012-07-16 23:49:50
on branch trunk
— Add OF_ENSURE.
This is to be used when the condition includes a statement that needs to
be executed, as with assert, this would not be executed anymore when
NDEBUG is defined. (user: js, size: 11934) [annotate] [blame] [check-ins using]
To Artifact [6ab3d02d2d]:
- File src/OFBlock.m — part of check-in [fcade8da38] at 2012-10-21 22:12:57 on branch trunk — Make GCC 4.4 happy. (user: js, size: 11900) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
175 176 177 178 179 180 181 | { of_block_literal_t *block = (of_block_literal_t*)block_; if (object_getClass((id)block) == (Class)&_NSConcreteStackBlock) { of_block_literal_t *copy; if ((copy = malloc(block->descriptor->size)) == NULL) { | | | | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | { of_block_literal_t *block = (of_block_literal_t*)block_; if (object_getClass((id)block) == (Class)&_NSConcreteStackBlock) { of_block_literal_t *copy; if ((copy = malloc(block->descriptor->size)) == NULL) { alloc_failed_exception.isa = [OFAllocFailedException class]; @throw (OFAllocFailedException*)&alloc_failed_exception; } memcpy(copy, block, block->descriptor->size); object_setClass((id)copy, (Class)&_NSConcreteMallocBlock); copy->flags++; |
︙ | ︙ | |||
263 264 265 266 267 268 269 | break; case OF_BLOCK_FIELD_IS_BYREF:; of_block_byref_t *src = (of_block_byref_t*)src_; of_block_byref_t **dst = (of_block_byref_t**)dst_; if ((src->flags & OF_BLOCK_REFCOUNT_MASK) == 0) { if ((*dst = malloc(src->size)) == NULL) { | | | | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | break; case OF_BLOCK_FIELD_IS_BYREF:; of_block_byref_t *src = (of_block_byref_t*)src_; of_block_byref_t **dst = (of_block_byref_t**)dst_; if ((src->flags & OF_BLOCK_REFCOUNT_MASK) == 0) { if ((*dst = malloc(src->size)) == NULL) { alloc_failed_exception.isa = [OFAllocFailedException class]; @throw (OFAllocFailedException*) &alloc_failed_exception; } if (src->forwarding == src) (*dst)->forwarding = *dst; |
︙ | ︙ |