ObjFW  Diff

Differences From Artifact [92797b60e4]:

To Artifact [befd533abe]:


130
131
132
133
134
135
136
137











138
139
140
141
142
143
144
145
146
147
148

149
150
151
152
153
154

155

156
157
158
159
160
161
162
		cache = tmp;
		cacheLength -= length;

		return length;
	}
}

- (void)asyncReadWithBuffer: (void*)buffer











		     length: (size_t)length
		      block: (of_stream_async_read_block_t)block
{
	[OFRunLoop OF_addAsyncReadForStream: self
				     buffer: buffer
				     length: length
				      block: block];
}

- (void)readIntoBuffer: (void*)buffer
	   exactLength: (size_t)length

{
	size_t readLength = 0;

	while (readLength < length)
		readLength += [self readIntoBuffer: (char*)buffer + readLength
					    length: length - readLength];

}


- (uint8_t)readInt8
{
	uint8_t ret;

	[self readIntoBuffer: (char*)&ret
		 exactLength: 1];







|
>
>
>
>
>
>
>
>
>
>
>









|
|
>

<
|
<
|
|
>

>







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

162

163
164
165
166
167
168
169
170
171
172
173
174
		cache = tmp;
		cacheLength -= length;

		return length;
	}
}

- (void)readIntoBuffer: (void*)buffer
	   exactLength: (size_t)length
{
	size_t readLength = 0;

	while (readLength < length)
		readLength += [self readIntoBuffer: (char*)buffer + readLength
					    length: length - readLength];
}

#ifdef OF_HAVE_BLOCKS
- (void)asyncReadIntoBuffer: (void*)buffer
		     length: (size_t)length
		      block: (of_stream_async_read_block_t)block
{
	[OFRunLoop OF_addAsyncReadForStream: self
				     buffer: buffer
				     length: length
				      block: block];
}

- (void)asyncReadIntoBuffer: (void*)buffer
		exactLength: (size_t)length
		      block: (of_stream_async_read_block_t)block
{

	[OFRunLoop OF_addAsyncReadForStream: self

				     buffer: buffer
				exactLength: length
				      block: block];
}
#endif

- (uint8_t)readInt8
{
	uint8_t ret;

	[self readIntoBuffer: (char*)&ret
		 exactLength: 1];