From 9e06114e1a10421968d9022d647554d353612ac5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 16 Jan 2025 12:39:44 -1000 Subject: [PATCH] feat: small performance improvement to writing outgoing packets --- src/zeroconf/_dns.pxd | 2 +- src/zeroconf/_protocol/outgoing.pxd | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zeroconf/_dns.pxd b/src/zeroconf/_dns.pxd index e41ac4c34..5ff98a8d4 100644 --- a/src/zeroconf/_dns.pxd +++ b/src/zeroconf/_dns.pxd @@ -134,7 +134,7 @@ cdef class DNSService(DNSRecord): cdef class DNSNsec(DNSRecord): cdef public cython.int _hash - cdef public object next_name + cdef public str next_name cdef public cython.list rdtypes cdef _fast_init(self, str name, cython.uint type_, cython.uint class_, cython.float ttl, str next_name, cython.list rdtypes, double created) diff --git a/src/zeroconf/_protocol/outgoing.pxd b/src/zeroconf/_protocol/outgoing.pxd index fa1aeebcd..bb9730b89 100644 --- a/src/zeroconf/_protocol/outgoing.pxd +++ b/src/zeroconf/_protocol/outgoing.pxd @@ -108,6 +108,8 @@ cdef class DNSOutgoing: cpdef void write_string(self, cython.bytes value) + cpdef void write_character_string(self, cython.bytes value) + @cython.locals(utfstr=bytes) cdef void _write_utf(self, cython.str value)