File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ cdef class ReadBuffer:
101
101
return self ._current_message_len
102
102
103
103
cdef inline read_utf8(self ):
104
- return self .read_cstr ().decode(' utf-8' )
104
+ return self .read_null_str ().decode(' utf-8' )
105
105
106
106
cdef feed_data(self , data)
107
107
cdef inline _ensure_first_buf(self )
@@ -113,7 +113,7 @@ cdef class ReadBuffer:
113
113
cdef bytes read_bytes(self , ssize_t nbytes)
114
114
cdef inline int32_t read_int32(self ) except ? - 1
115
115
cdef inline int16_t read_int16(self ) except ? - 1
116
- cdef inline read_cstr (self )
116
+ cdef inline read_null_str (self )
117
117
cdef int32_t take_message(self ) except - 1
118
118
cdef inline int32_t take_message_type(self , char mtype) except - 1
119
119
cdef int32_t put_message(self ) except - 1
Original file line number Diff line number Diff line change @@ -419,10 +419,10 @@ cdef class ReadBuffer:
419
419
mem = self .read_bytes(2 )
420
420
return hton.unpack_int16(cpython.PyBytes_AS_STRING(mem))
421
421
422
- cdef inline read_cstr (self ):
422
+ cdef inline read_null_str (self ):
423
423
if not self ._current_message_ready:
424
424
raise exceptions.BufferError(
425
- ' read_cstr only works when the message guaranteed '
425
+ ' read_null_str only works when the message guaranteed '
426
426
' to be in the buffer' )
427
427
428
428
cdef:
@@ -459,7 +459,8 @@ cdef class ReadBuffer:
459
459
460
460
self ._current_message_len_unread -= nread
461
461
if self ._current_message_len_unread < 0 :
462
- raise exceptions.BufferError(' read_cstr: buffer overread' )
462
+ raise exceptions.BufferError(
463
+ ' read_null_str: buffer overread' )
463
464
464
465
return result
465
466
@@ -471,7 +472,8 @@ cdef class ReadBuffer:
471
472
472
473
self ._current_message_len_unread -= nread
473
474
if self ._current_message_len_unread < 0 :
474
- raise exceptions.BufferError(' read_cstr: buffer overread' )
475
+ raise exceptions.BufferError(
476
+ ' read_null_str: buffer overread' )
475
477
476
478
self ._ensure_first_buf()
477
479
You can’t perform that action at this time.
0 commit comments