Skip to content

Commit

Permalink
remove unused Python 2 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Dec 4, 2023
1 parent f5e28d3 commit 5d83538
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions zmq/backend/cython/message.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -231,26 +231,6 @@ cdef class Frame:
buffer.itemsize = 1
buffer.internal = NULL

def __getsegcount__(self, Py_ssize_t *lenp):
# required for getreadbuffer
if lenp != NULL:
lenp[0] = zmq_msg_size(&self.zmq_msg)
return 1

def __getreadbuffer__(self, Py_ssize_t idx, void **p):
# old-style (buffer) interface
cdef char *data_c = NULL
cdef Py_ssize_t data_len_c
if idx != 0:
raise SystemError("accessing non-existent buffer segment")
# read-only, because we don't want to allow
# editing of the message in-place
data_c = <char *>zmq_msg_data(&self.zmq_msg)
data_len_c = zmq_msg_size(&self.zmq_msg)
if p != NULL:
p[0] = <void*>data_c
return data_len_c

# end buffer interface

def __copy__(self):
Expand Down

0 comments on commit 5d83538

Please sign in to comment.