Differences From Artifact [ca3998cc6e]:
- File
src/OFKernelEventObserver_select.m
— part of check-in
[c658e97994]
at
2017-05-21 20:03:06
on branch trunk
— Cast several socket-related arguments to void *
This is required to make it work on MorphOS with -noixemul, as socket
functions take UBYTE * arguments instead then, resulting in a warning
about signedness because char is signed. (user: js, size: 5117) [annotate] [blame] [check-ins using]
To Artifact [ab8bd97091]:
- File
src/OFKernelEventObserver_select.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 5117) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
61 62 63 64 65 66 67 | @throw [OFOutOfRangeException exception]; _maxFD = (int)_cancelFD[0]; return self; } | | | | | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | @throw [OFOutOfRangeException exception]; _maxFD = (int)_cancelFD[0]; return self; } - (void)of_addObjectForReading: (id <OFReadyForReadingObserving>)object { int fd = [object fileDescriptorForReading]; if (fd < 0 || fd > INT_MAX - 1) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS if (fd >= (int)FD_SETSIZE) @throw [OFOutOfRangeException exception]; #endif if (fd > _maxFD) _maxFD = fd; FD_SET((of_socket_t)fd, &_readFDs); } - (void)of_addObjectForWriting: (id <OFReadyForWritingObserving>)object { int fd = [object fileDescriptorForWriting]; if (fd < 0 || fd > INT_MAX - 1) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS if (fd >= (int)FD_SETSIZE) @throw [OFOutOfRangeException exception]; #endif if (fd > _maxFD) _maxFD = fd; FD_SET((of_socket_t)fd, &_writeFDs); } - (void)of_removeObjectForReading: (id <OFReadyForReadingObserving>)object { /* TODO: Adjust _maxFD */ int fd = [object fileDescriptorForReading]; if (fd < 0) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS if (fd >= (int)FD_SETSIZE) @throw [OFOutOfRangeException exception]; #endif FD_CLR((of_socket_t)fd, &_readFDs); } - (void)of_removeObjectForWriting: (id <OFReadyForWritingObserving>)object { /* TODO: Adjust _maxFD */ int fd = [object fileDescriptorForWriting]; if (fd < 0) @throw [OFOutOfRangeException exception]; |
︙ | ︙ | |||
140 141 142 143 144 145 146 | id const *objects; fd_set readFDs; fd_set writeFDs; struct timeval timeout; int events; size_t count; | | | | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | id const *objects; fd_set readFDs; fd_set writeFDs; struct timeval timeout; int events; size_t count; [self of_processQueue]; if ([self of_processReadBuffers]) return; #ifdef FD_COPY FD_COPY(&_readFDs, &readFDs); FD_COPY(&_writeFDs, &writeFDs); #else readFDs = _readFDs; |
︙ | ︙ |