From ddba96a73107644e31af591d8b726472a7deb85b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 1 Oct 2022 22:40:34 -1000 Subject: [PATCH] feat: add additional cython types to marshaller (#48) --- src/dbus_fast/_private/marshaller.pxd | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/dbus_fast/_private/marshaller.pxd b/src/dbus_fast/_private/marshaller.pxd index b69d4ea..0f08901 100644 --- a/src/dbus_fast/_private/marshaller.pxd +++ b/src/dbus_fast/_private/marshaller.pxd @@ -6,7 +6,7 @@ import cython cdef class Marshaller: cdef object signature_tree - cdef object _buf + cdef bytearray _buf cdef object body @@ -25,10 +25,23 @@ cdef class Marshaller: @cython.locals( array_len=cython.uint, written=cython.uint, + array_len_packed=cython.bytes, ) cpdef write_array(self, object array, object type) + @cython.locals( + written=cython.uint, + ) + cpdef write_struct(self, object array, object type) + @cython.locals( written=cython.uint, ) cpdef write_single(self, object type_, object body) + + cpdef marshall(self) + + @cython.locals( + offset=cython.ulong, + ) + cpdef _construct_buffer(self)