Ported dna.Name, dna.Field, and started with dna.Struct
This commit is contained in:
@@ -4,7 +4,7 @@ import struct
|
||||
import typing
|
||||
|
||||
|
||||
class LittleEndianTypes:
|
||||
class EndianIO:
|
||||
UCHAR = struct.Struct(b'<b')
|
||||
USHORT = struct.Struct(b'<H')
|
||||
USHORT2 = struct.Struct(b'<HH') # two shorts in a row
|
||||
@@ -61,6 +61,10 @@ class LittleEndianTypes:
|
||||
raise ValueError('unsupported pointer size %d' % fileheader.pointer_size)
|
||||
|
||||
|
||||
class LittleEndianTypes(EndianIO):
|
||||
pass
|
||||
|
||||
|
||||
class BigEndianTypes(LittleEndianTypes):
|
||||
UCHAR = struct.Struct(b'>b')
|
||||
USHORT = struct.Struct(b'>H')
|
||||
|
||||
Reference in New Issue
Block a user