-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cython extension for messages and signature
- Loading branch information
Showing
8 changed files
with
124 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"""cdefs for message.py""" | ||
|
||
import cython | ||
|
||
|
||
cdef unsigned int LITTLE_ENDIAN | ||
cdef unsigned int BIG_ENDIAN | ||
cdef unsigned int PROTOCOL_VERSION | ||
|
||
cdef unsigned int HEADER_PATH | ||
cdef unsigned int HEADER_INTERFACE | ||
cdef unsigned int HEADER_MEMBER | ||
cdef unsigned int HEADER_ERROR_NAME | ||
cdef unsigned int HEADER_REPLY_SERIAL | ||
cdef unsigned int HEADER_DESTINATION | ||
cdef unsigned int HEADER_SIGNATURE | ||
cdef unsigned int HEADER_UNIX_FDS | ||
|
||
cdef unsigned int METHOD_CALL | ||
cdef unsigned int SIGNAL | ||
cdef unsigned int ERROR | ||
cdef unsigned int METHOD_RETURN | ||
|
||
|
||
cdef class Message: | ||
|
||
cdef public str destination | ||
cdef public str path | ||
cdef public str interface | ||
cdef public str member | ||
cdef public object message_type | ||
cdef public object flags | ||
cdef public str error_name | ||
cdef public object reply_serial | ||
cdef public str sender | ||
cdef public list unix_fds | ||
cdef public str signature | ||
cdef public object signature_tree | ||
cdef public list body | ||
cdef public object serial | ||
|
||
@cython.locals( | ||
fields=cython.list, | ||
header_body=cython.list, | ||
) | ||
cpdef _marshall(self, negotiate_unix_fd = *) | ||
|
||
cpdef _matches(self, dict matcher) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""cdefs for signature.py""" | ||
|
||
import cython | ||
|
||
|
||
cdef class SignatureType: | ||
|
||
cdef public str token | ||
cdef public list children | ||
cdef str _signature | ||
|
||
cdef _collapse(self) | ||
|
||
|
||
cdef class SignatureTree: | ||
|
||
cdef public str signature | ||
cdef public list types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters