Differences From Artifact [5e762c9efc]:
- File src/OFStreamObserver_kqueue.m — part of check-in [8892ae9fcc] at 2012-07-12 01:28:46 on branch trunk — Don't access isa directly. (user: js, size: 3492) [annotate] [blame] [check-ins using]
To Artifact [0f25fb90be]:
- File
src/OFStreamObserver_kqueue.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: 3515) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import "OFStreamObserver_kqueue.h" #import "OFDataArray.h" #import "OFAutoreleasePool.h" #import "OFInitializationFailedException.h" #import "OFOutOfMemoryException.h" #define EVENTLIST_SIZE 64 @implementation OFStreamObserver_kqueue - init { self = [super init]; | > > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #import "OFStreamObserver_kqueue.h" #import "OFDataArray.h" #import "OFAutoreleasePool.h" #import "OFInitializationFailedException.h" #import "OFOutOfMemoryException.h" #import "macros.h" #define EVENTLIST_SIZE 64 @implementation OFStreamObserver_kqueue - init { self = [super init]; |
︙ | ︙ | |||
135 136 137 138 139 140 141 | return NO; } for (i = 0; i < events; i++) { if (eventList[i].ident == cancelFD[0]) { char buffer; | | | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | return NO; } for (i = 0; i < events; i++) { if (eventList[i].ident == cancelFD[0]) { char buffer; OF_ENSURE(read(cancelFD[0], &buffer, 1) > 0); continue; } if (eventList[i].flags & EV_ERROR) { [delegate streamDidReceiveException: FDToStream[eventList[i].ident]]; |
︙ | ︙ |