ObjFW  Diff

Differences From Artifact [e8b15decf5]:

To Artifact [628ba88c27]:


403
404
405
406
407
408
409


410
411
412
413
414
415
416
417
418
419
420
421
422

423
424
425
426
427
428
429
430
431
432
433
434
- (bool)OF_processCache
{
	id const *objects = [_readObjects objects];
	size_t i, count = [_readObjects count];
	bool foundInCache = false;

	for (i = 0; i < count; i++) {


		if ([objects[i] isKindOfClass: [OFStream class]] &&
		    [objects[i] hasDataInReadBuffer] &&
		    ![objects[i] OF_isWaitingForDelimiter]) {
			void *pool = objc_autoreleasePoolPush();

			if ([_delegate respondsToSelector:
			    @selector(objectIsReadyForReading:)])
				[_delegate objectIsReadyForReading: objects[i]];

			foundInCache = true;

			objc_autoreleasePoolPop(pool);
		}

	}

	/*
	 * As long as we have data in the cache for any stream, we don't want
	 * to block.
	 */
	if (foundInCache)
		return true;

	return false;
}
@end







>
>



<
<





|
<
|
>












403
404
405
406
407
408
409
410
411
412
413
414


415
416
417
418
419
420

421
422
423
424
425
426
427
428
429
430
431
432
433
434
- (bool)OF_processCache
{
	id const *objects = [_readObjects objects];
	size_t i, count = [_readObjects count];
	bool foundInCache = false;

	for (i = 0; i < count; i++) {
		void *pool = objc_autoreleasePoolPush();

		if ([objects[i] isKindOfClass: [OFStream class]] &&
		    [objects[i] hasDataInReadBuffer] &&
		    ![objects[i] OF_isWaitingForDelimiter]) {


			if ([_delegate respondsToSelector:
			    @selector(objectIsReadyForReading:)])
				[_delegate objectIsReadyForReading: objects[i]];

			foundInCache = true;
		}


		objc_autoreleasePoolPop(pool);
	}

	/*
	 * As long as we have data in the cache for any stream, we don't want
	 * to block.
	 */
	if (foundInCache)
		return true;

	return false;
}
@end