Skip to content

Commit 1b4af3c

Browse files
committed
Add a comment to help to test ReadBuffer
1 parent de3b615 commit 1b4af3c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

buffer.pyx

+11
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,17 @@ cdef class ReadBuffer:
253253

254254
if not cpython.PyBytes_CheckExact(data):
255255
raise exceptions.BufferError('feed_data: bytes object expected')
256+
257+
# Uncomment the below code to test code paths that
258+
# read single int/str/bytes sequences are split over
259+
# multiple received buffers.
260+
#
261+
# ll = 107
262+
# if len(data) > ll:
263+
# self.feed_data(data[:ll])
264+
# self.feed_data(data[ll:])
265+
# return
266+
256267
data_bytes = <bytes>data
257268

258269
dlen = cpython.Py_SIZE(data_bytes)

0 commit comments

Comments
 (0)