ObjFW  Diff

Differences From Artifact [9b934c5330]:

To Artifact [8ab72d20c1]:


282
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

	_writtenLength += length;

	if (_writtenLength != _length && exception == nil)
		return true;

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		_block(object, _buffer, _writtenLength, exception);




	else {
# endif
		void (*func)(id, SEL, OFStream *, const void *, size_t, id,
		    id) = (void (*)(id, SEL, OFStream *, const void *, size_t,
		    id, id))[_target methodForSelector: _selector];

		func(_target, _selector, object, _buffer, _writtenLength,
		    _context, exception);




# ifdef OF_HAVE_BLOCKS
	}
# endif

	return false;
}

- (void)dealloc
{
	[_block release];

	[super dealloc];







|
|
>
>
>
>
|

|
|


|
|
>
>
>
>



<
<







282
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
314
315
316

	_writtenLength += length;

	if (_writtenLength != _length && exception == nil)
		return true;

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL) {
		if (!_block(object, _buffer, _writtenLength, exception))
			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];

		if (!func(_target, _selector, object, _buffer, _writtenLength,
		    _context, exception))
			return false;

		_writtenLength = 0;
		return true;
# ifdef OF_HAVE_BLOCKS
	}
# endif


}

- (void)dealloc
{
	[_block release];

	[super dealloc];