@@ -274,11 +274,11 @@ assert(queue != nil); @try { if (![queue.firstObject handleObject: object]) { - OFListItem *listItem = queue.firstListItem; + OFListItem listItem = queue.firstListItem; /* * The handler might have called -[cancelAsyncRequests] * so that our queue is now empty, in which case we * should do nothing. @@ -288,11 +288,12 @@ * Make sure we keep the target until after we * are done removing the object. The reason for * this is that the target might call * -[cancelAsyncRequests] in its dealloc. */ - [[listItem->object retain] autorelease]; + [[OFListItemObject(listItem) retain] + autorelease]; [queue removeListItem: listItem]; if (queue.count == 0) { [_kernelEventObserver @@ -317,11 +318,11 @@ assert(queue != nil); @try { if (![queue.firstObject handleObject: object]) { - OFListItem *listItem = queue.firstListItem; + OFListItem listItem = queue.firstListItem; /* * The handler might have called -[cancelAsyncRequests] * so that our queue is now empty, in which case we * should do nothing. @@ -331,11 +332,12 @@ * Make sure we keep the target until after we * are done removing the object. The reason for * this is that the target might call * -[cancelAsyncRequests] in its dealloc. */ - [[listItem->object retain] autorelease]; + [[OFListItemObject(listItem) retain] + autorelease]; [queue removeListItem: listItem]; if (queue.count == 0) { [_kernelEventObserver @@ -1418,13 +1420,13 @@ #ifdef OF_HAVE_THREADS [state->_timersQueueMutex lock]; @try { #endif - for (OFListItem *iter = state->_timersQueue.firstListItem; - iter != NULL; iter = iter->next) { - if ([iter->object isEqual: timer]) { + for (OFListItem iter = state->_timersQueue.firstListItem; + iter != NULL; iter = OFListItemNext(iter)) { + if ([OFListItemObject(iter) isEqual: timer]) { [state->_timersQueue removeListItem: iter]; break; } } #ifdef OF_HAVE_THREADS @@ -1575,16 +1577,17 @@ #ifdef OF_HAVE_THREADS [state->_timersQueueMutex lock]; @try { #endif - OFListItem *listItem = + OFListItem listItem = state->_timersQueue.firstListItem; - if (listItem != NULL && [listItem->object - fireDate].timeIntervalSinceNow <= 0) { - timer = [[listItem->object + if (listItem != NULL && + [OFListItemObject(listItem) fireDate] + .timeIntervalSinceNow <= 0) { + timer = [[OFListItemObject(listItem) retain] autorelease]; [state->_timersQueue removeListItem: listItem];