Overview
| Comment: | Always do nothing if OF_BLOCK_BYREF_CALLER is set. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | 0.5 |
| Files: | files | file ages | folders |
| SHA3-256: |
0c5ed4d438b9f228fa7d033b11707c10 |
| User & Date: | js on 2011-07-14 23:04:39 |
| Other Links: | branch diff | manifest | tags |
Context
|
2011-07-14
| ||
| 23:06 | Fix reference counting for blocks. (check-in: 66be98f1d1 user: js tags: 0.5) | |
| 23:04 | Always do nothing if OF_BLOCK_BYREF_CALLER is set. (check-in: 0c5ed4d438 user: js tags: 0.5) | |
| 22:56 | Fix missing return. (check-in: 989d2c3e36 user: js tags: 0.5) | |
Changes
Modified src/OFBlock.m from [2087d2a41e] to [c7116e51f3].
| ︙ | ︙ | |||
236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
_Block_object_assign(void *dst_, const void *src_, const int flags_)
{
int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK |
OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF);
if (src_ == NULL)
return;
switch (flags) {
case OF_BLOCK_FIELD_IS_BLOCK:
*(of_block_literal_t**)dst_ = _Block_copy(src_);
break;
case OF_BLOCK_FIELD_IS_OBJECT:
*(id*)dst_ = [(id)src_ retain];
| > > > | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
_Block_object_assign(void *dst_, const void *src_, const int flags_)
{
int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK |
OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF);
if (src_ == NULL)
return;
if (flags_ & OF_BLOCK_BYREF_CALLER)
return;
switch (flags) {
case OF_BLOCK_FIELD_IS_BLOCK:
*(of_block_literal_t**)dst_ = _Block_copy(src_);
break;
case OF_BLOCK_FIELD_IS_OBJECT:
*(id*)dst_ = [(id)src_ retain];
|
| ︙ | ︙ | |||
279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
_Block_object_dispose(const void *obj_, const int flags_)
{
const int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK |
OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF);
if (obj_ == NULL)
return;
switch (flags) {
case OF_BLOCK_FIELD_IS_BLOCK:
_Block_release(obj_);
break;
case OF_BLOCK_FIELD_IS_OBJECT:
[(id)obj_ release];
| > > > | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
_Block_object_dispose(const void *obj_, const int flags_)
{
const int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK |
OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF);
if (obj_ == NULL)
return;
if (flags_ & OF_BLOCK_BYREF_CALLER)
return;
switch (flags) {
case OF_BLOCK_FIELD_IS_BLOCK:
_Block_release(obj_);
break;
case OF_BLOCK_FIELD_IS_OBJECT:
[(id)obj_ release];
|
| ︙ | ︙ |