ObjFW  Diff

Differences From Artifact [c2387049cc]:

To Artifact [5e762c9efc]:


38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
38
39
40
41
42
43
44

45
46
47
48
49
50
51
52







-
+







- init
{
	self = [super init];

	@try {
		if ((kernelQueue = kqueue()) == -1)
			@throw [OFInitializationFailedException
			    exceptionWithClass: isa];
			    exceptionWithClass: [self class]];

		changeList = [[OFDataArray alloc] initWithItemSize:
		    sizeof(struct kevent)];

		[self _addFileDescriptorForReading: cancelFD[0]];
	} @catch (id e) {
		[self release];
117
118
119
120
121
122
123
124


125
126
127
128
129
130
131
117
118
119
120
121
122
123

124
125
126
127
128
129
130
131
132







-
+
+







	if (events == -1) {
		switch (errno) {
		case EINTR:
			[pool release];
			return NO;
		case ENOMEM:
			[pool release];
			@throw [OFOutOfMemoryException exceptionWithClass: isa];
			@throw [OFOutOfMemoryException
			    exceptionWithClass: [self class]];
		default:
			assert(0);
		}
	}

	[changeList removeAllItems];