ObjFW  Diff

Differences From Artifact [2cf46b37b4]:

To Artifact [9bf00d9f6c]:


214
215
216
217
218
219
220
221
222


223
224
225
226
227
228
229
214
215
216
217
218
219
220


221
222
223
224
225
226
227
228
229







-
-
+
+







	}

	objc_autoreleasePoolPop(pool);

	return j;
}

- (void)lowlevelWriteBuffer: (const void *)buffer_
		     length: (size_t)length
- (size_t)lowlevelWriteBuffer: (const void *)buffer_
		       length: (size_t)length
{
	const char *buffer = buffer_;
	char16_t *tmp;
	size_t i = 0, j = 0;

	if (length > SIZE_MAX / 2)
		@throw [OFOutOfRangeException exception];
343
344
345
346
347
348
349
350








351
343
344
345
346
347
348
349

350
351
352
353
354
355
356
357
358







-
+
+
+
+
+
+
+
+

			    exceptionWithObject: self
				requestedLength: j * 2
				   bytesWritten: bytesWritten * 2
					  errNo: 0];
	} @finally {
		[self freeMemory: tmp];
	}
}

	/*
	 * We do not count in bytes when writing to the Win32 console. But
	 * since any incomplete write is an exception here anyway, we can just
	 * return length.
	 */
	return length;
}
@end