File tree Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -149,16 +149,6 @@ cdef class Buffer:
149149 errors._raise_err(errors.ERR_INTEGER_TOO_LARGE, length = length[0 ],
150150 max_length = max_length)
151151
152- cdef const char_type* _get_more_data(self , ssize_t num_bytes_available,
153- ssize_t num_bytes_wanted) except NULL :
154- """
155- Called when the amount of data available is less than the amount of
156- data requested. By default an error is raised.
157- """
158- errors._raise_err(errors.ERR_UNEXPECTED_END_OF_DATA,
159- num_bytes_wanted = num_bytes_wanted,
160- num_bytes_available = num_bytes_available)
161-
162152 cdef const char_type* _get_raw(self , ssize_t num_bytes) except NULL :
163153 """
164154 Returns a pointer to a buffer containing the requested number of bytes.
@@ -168,7 +158,9 @@ cdef class Buffer:
168158 const char_type * ptr
169159 num_bytes_left = self ._size - self ._pos
170160 if num_bytes > num_bytes_left:
171- return self ._get_more_data(num_bytes_left, num_bytes)
161+ errors._raise_err(errors.ERR_UNEXPECTED_END_OF_DATA,
162+ num_bytes_wanted = num_bytes,
163+ num_bytes_available = num_bytes_left)
172164 ptr = & self ._data[self ._pos]
173165 self ._pos += num_bytes
174166 return ptr
Original file line number Diff line number Diff line change @@ -227,16 +227,6 @@ cdef class ReadBuffer(Buffer):
227227 errors._raise_err(errors.ERR_INTEGER_TOO_LARGE, length = length[0 ],
228228 max_length = max_length)
229229
230- cdef const char_type* _get_more_data(self , ssize_t num_bytes_available,
231- ssize_t num_bytes_wanted) except NULL :
232- """
233- Called when the amount of data available is less than the amount of
234- data requested. This will fetch another packet from the server. The
235- original data will be saved either in a chunked bytes buffer or the
236- split buffer (depending on how the data was requested).
237- """
238-
239-
240230 cdef const char_type* _get_raw(self , ssize_t num_bytes,
241231 bint in_chunked_read = False ) except NULL :
242232 """
You can’t perform that action at this time.
0 commit comments