ObjFW  Diff

Differences From Artifact [bace7b9989]:

To Artifact [f060fd2dab]:


767
768
769
770
771
772
773
774
775


776
777



778
779
780


781
782
783
784
785
786
787
767
768
769
770
771
772
773


774
775
776

777
778
779
780
781
782
783
784
785
786
787
788
789
790
791







-
-
+
+

-
+
+
+



+
+







		     length: (size_t)length
{
	if (_fd == -1 || _atEndOfStream || write(_fd, buffer, length) < length)
		@throw [OFWriteFailedException exceptionWithStream: self
						   requestedLength: length];
}

- (void)lowlevelSeekToOffset: (off_t)offset
		      whence: (int)whence
- (off_t)lowlevelSeekToOffset: (off_t)offset
		       whence: (int)whence
{
	if (lseek(_fd, offset, whence) == -1)
	off_t ret = lseek(_fd, offset, whence);

	if (ret == -1)
		@throw [OFSeekFailedException exceptionWithStream: self
							   offset: offset
							   whence: whence];

	return ret;
}

- (int)fileDescriptorForReading
{
	return _fd;
}