From 3613ff846b8bb66000c65c778bb06596cd643b22 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 7 Oct 2022 07:11:25 -1000 Subject: [PATCH] fix: remove unused unmarshaller code (#83) --- src/dbus_fast/_private/constants.py | 3 --- src/dbus_fast/_private/unmarshaller.pxd | 10 ---------- src/dbus_fast/_private/unmarshaller.py | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/dbus_fast/_private/constants.py b/src/dbus_fast/_private/constants.py index 5ab7aefd..605c3cf0 100644 --- a/src/dbus_fast/_private/constants.py +++ b/src/dbus_fast/_private/constants.py @@ -16,6 +16,3 @@ class HeaderField(Enum): SENDER = 7 SIGNATURE = 8 UNIX_FDS = 9 - - -HEADER_NAME_MAP = {field.value: field.name for field in HeaderField} diff --git a/src/dbus_fast/_private/unmarshaller.pxd b/src/dbus_fast/_private/unmarshaller.pxd index 76fba2d8..2447ddce 100644 --- a/src/dbus_fast/_private/unmarshaller.pxd +++ b/src/dbus_fast/_private/unmarshaller.pxd @@ -5,16 +5,6 @@ import cython from ..signature import SignatureType -cdef str HEADER_DESTINATION -cdef str HEADER_PATH -cdef str HEADER_INTERFACE -cdef str HEADER_MEMBER -cdef str HEADER_ERROR_NAME -cdef str HEADER_REPLY_SERIAL -cdef str HEADER_SENDER -cdef str HEADER_SIGNATURE - - cdef unsigned int UINT32_SIZE cdef unsigned int INT16_SIZE cdef unsigned int HEADER_ARRAY_OF_STRUCT_SIGNATURE_POSITION diff --git a/src/dbus_fast/_private/unmarshaller.py b/src/dbus_fast/_private/unmarshaller.py index 078e49a1..5809a3b7 100644 --- a/src/dbus_fast/_private/unmarshaller.py +++ b/src/dbus_fast/_private/unmarshaller.py @@ -9,7 +9,7 @@ from ..errors import InvalidMessageError from ..message import Message from ..signature import SignatureType, Variant, get_signature_tree -from .constants import BIG_ENDIAN, LITTLE_ENDIAN, PROTOCOL_VERSION, HeaderField +from .constants import BIG_ENDIAN, LITTLE_ENDIAN, PROTOCOL_VERSION IS_LITTLE_ENDIAN = sys.byteorder == "little" IS_BIG_ENDIAN = sys.byteorder == "big"