Skip to content

Commit 517d7d0

Browse files
authored
feat: small speed up to constructing outgoing packets (#1354)
1 parent 6c15325 commit 517d7d0

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/zeroconf/_protocol/outgoing.pxd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ cdef class DNSOutgoing:
5050
cdef public cython.list authorities
5151
cdef public cython.list additionals
5252

53-
cpdef _reset_for_next_packet(self)
53+
cpdef void _reset_for_next_packet(self)
5454

55-
cdef _write_byte(self, cython.uint value)
55+
cdef void _write_byte(self, cython.uint value)
5656

5757
cdef void _insert_short_at_start(self, unsigned int value)
5858

59-
cdef _replace_short(self, cython.uint index, cython.uint value)
59+
cdef void _replace_short(self, cython.uint index, cython.uint value)
6060

6161
cdef _get_short(self, cython.uint value)
6262

63-
cdef _write_int(self, object value)
63+
cdef void _write_int(self, object value)
6464

6565
cdef cython.bint _write_question(self, DNSQuestion question)
6666

@@ -73,7 +73,7 @@ cdef class DNSOutgoing:
7373
cdef cython.bint _write_record(self, DNSRecord record, double now)
7474

7575
@cython.locals(class_=cython.uint)
76-
cdef _write_record_class(self, DNSEntry record)
76+
cdef void _write_record_class(self, DNSEntry record)
7777

7878
@cython.locals(
7979
start_size_int=object
@@ -91,7 +91,7 @@ cdef class DNSOutgoing:
9191

9292
cdef bint _has_more_to_add(self, unsigned int questions_offset, unsigned int answer_offset, unsigned int authority_offset, unsigned int additional_offset)
9393

94-
cdef _write_ttl(self, DNSRecord record, double now)
94+
cdef void _write_ttl(self, DNSRecord record, double now)
9595

9696
@cython.locals(
9797
labels=cython.list,
@@ -100,16 +100,16 @@ cdef class DNSOutgoing:
100100
start_size=cython.uint,
101101
name_length=cython.uint,
102102
)
103-
cpdef write_name(self, cython.str name)
103+
cpdef void write_name(self, cython.str name)
104104

105-
cdef _write_link_to_name(self, unsigned int index)
105+
cdef void _write_link_to_name(self, unsigned int index)
106106

107-
cpdef write_short(self, cython.uint value)
107+
cpdef void write_short(self, cython.uint value)
108108

109-
cpdef write_string(self, cython.bytes value)
109+
cpdef void write_string(self, cython.bytes value)
110110

111111
@cython.locals(utfstr=bytes)
112-
cpdef _write_utf(self, cython.str value)
112+
cdef void _write_utf(self, cython.str value)
113113

114114
@cython.locals(
115115
debug_enable=bint,

0 commit comments

Comments
 (0)