Skip to content

ByteOrder not respected across Structured boundaries #54

Description

@lojack5

This one's a difficult one:

class Inner(Structured, byte_order=ByteOrder.LE):
  val: uint32

class Outer(Structured, byte_order=ByteOrder.BE):
  inner: Inner

Here when Outer is unpacked, its inner attribute still unpacks with Little-Endian byte order. We'll have to be careful about how we solve this, since the StructuredSerializer delegates to the Inner class itself, so we can't do a simple Inner.serializer.with_byte_order, otherwise we modify the class in place.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions