Differences From Artifact [8ab72d20c1]:
- File
src/OFRunLoop.m
— part of check-in
[47db5636d7]
at
2017-09-24 13:15:54
on branch trunk
— Return a bool from async write handlers
This allows performing another write with the same buffer, length and
callback, which is useful for asynchronously writing in chunks. (user: js, size: 20777) [annotate] [blame] [check-ins using]
To Artifact [20e274a7c7]:
- File src/OFRunLoop.m — part of check-in [1084b23ef7] at 2017-09-24 15:13:55 on branch trunk — OFStream: More flexible repeating async writes (user: js, size: 20831) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
283 284 285 286 287 288 289 | _writtenLength += length; if (_writtenLength != _length && exception == nil) return true; # ifdef OF_HAVE_BLOCKS if (_block != NULL) { | | > > | | > > | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | _writtenLength += length; if (_writtenLength != _length && exception == nil) return true; # ifdef OF_HAVE_BLOCKS if (_block != NULL) { _length = _block(object, &_buffer, _writtenLength, exception); if (_length == 0) return false; _writtenLength = 0; return true; } else { # endif bool (*func)(id, SEL, OFStream *, const void *, size_t, id, id) = (bool (*)(id, SEL, OFStream *, const void *, size_t, id, id))[_target methodForSelector: _selector]; _length = func(_target, _selector, object, &_buffer, _writtenLength, _context, exception); if (_length == 0) return false; _writtenLength = 0; return true; # ifdef OF_HAVE_BLOCKS } # endif |
︙ | ︙ |