File tree 2 files changed +3
-21
lines changed
2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -149,16 +149,6 @@ cdef class Buffer:
149
149
errors._raise_err(errors.ERR_INTEGER_TOO_LARGE, length = length[0 ],
150
150
max_length = max_length)
151
151
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
-
162
152
cdef const char_type* _get_raw(self , ssize_t num_bytes) except NULL :
163
153
"""
164
154
Returns a pointer to a buffer containing the requested number of bytes.
@@ -168,7 +158,9 @@ cdef class Buffer:
168
158
const char_type * ptr
169
159
num_bytes_left = self ._size - self ._pos
170
160
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)
172
164
ptr = & self ._data[self ._pos]
173
165
self ._pos += num_bytes
174
166
return ptr
Original file line number Diff line number Diff line change @@ -227,16 +227,6 @@ cdef class ReadBuffer(Buffer):
227
227
errors._raise_err(errors.ERR_INTEGER_TOO_LARGE, length = length[0 ],
228
228
max_length = max_length)
229
229
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
-
240
230
cdef const char_type* _get_raw(self , ssize_t num_bytes,
241
231
bint in_chunked_read = False ) except NULL :
242
232
"""
You can’t perform that action at this time.
0 commit comments