ObjFW  Diff

Differences From Artifact [5e762c9efc]:

To Artifact [0f25fb90be]:


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
142
143
144
145
146
147
148
149
		return NO;
	}

	for (i = 0; i < events; i++) {
		if (eventList[i].ident == cancelFD[0]) {
			char buffer;

			assert(read(cancelFD[0], &buffer, 1) > 0);

			continue;
		}

		if (eventList[i].flags & EV_ERROR) {
			[delegate streamDidReceiveException:
			    FDToStream[eventList[i].ident]];







|







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]];