Skip to content

Commit

Permalink
fix: ensure void methods that can raise exceptions are marked (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Mar 7, 2025
1 parent 28888b9 commit c433dab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/dbus_fast/_private/unmarshaller.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ cdef class Unmarshaller:
cdef unsigned int _pos
cdef object _stream
cdef object _sock
cdef object _message
cdef Message _message
cdef object _readers
cdef unsigned int _body_len
cdef unsigned int _serial
Expand Down Expand Up @@ -161,20 +161,20 @@ cdef class Unmarshaller:
recv=cython.tuple,
errno=cython.uint
)
cdef void _read_sock_with_fds(self, unsigned int pos, unsigned int missing_bytes)
cdef void _read_sock_with_fds(self, unsigned int pos, unsigned int missing_bytes) except *

@cython.locals(
data=cython.bytes,
errno=cython.uint
)
cdef void _read_sock_without_fds(self, unsigned int pos)
cdef void _read_sock_without_fds(self, unsigned int pos) except *

@cython.locals(
data=cython.bytes
)
cdef void _read_stream(self, unsigned int pos, unsigned int missing_bytes)
cdef void _read_stream(self, unsigned int pos, unsigned int missing_bytes) except *

cdef void _read_to_pos(self, unsigned int pos)
cdef void _read_to_pos(self, unsigned int pos) except *

cpdef read_boolean(self, SignatureType type_)

Expand Down Expand Up @@ -232,7 +232,7 @@ cdef class Unmarshaller:
key=cython.str,
ustring="const unsigned char *",
)
cdef _read_header(self)
cdef void _read_header(self) except *

@cython.locals(
body=list,
Expand All @@ -242,9 +242,9 @@ cdef class Unmarshaller:
tree=SignatureTree,
message=Message
)
cdef _read_body(self)
cdef void _read_body(self) except *

cdef _unmarshall(self)
cdef Message _unmarshall(self)

cpdef unmarshall(self)

Expand Down
4 changes: 2 additions & 2 deletions src/dbus_fast/message_bus.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cdef class BaseMessageBus:
cdef public object _stream
cdef public object _fd

cpdef void _process_message(self, Message msg)
cpdef void _process_message(self, Message msg) except *

@cython.locals(exported_service_interface=ServiceInterface)
cpdef export(self, str path, ServiceInterface interface)
Expand All @@ -72,4 +72,4 @@ cdef class BaseMessageBus:
_Method method,
Message msg,
object send_reply
)
) except *

0 comments on commit c433dab

Please sign in to comment.