Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from ctypes import *
- if sys.byteorder == "little":
- base = BigEndianStructure
- else:
- base = LittleEndianStructure
- class T(base):
- pass
- _fields_ = [("a", c_ubyte),
- ("b", c_byte),
- ("c", c_short),
- ("d", c_ushort),
- ("e", c_int),
- ("f", c_uint),
- ("g", c_long),
- ("h", c_ulong),
- ("i", c_longlong),
- ("k", c_ulonglong),
- ("l", c_float),
- ("m", c_double),
- ("n", c_char),
- ("b1", c_byte, 3),
- ("b2", c_byte, 3),
- ("b3", c_byte, 2),
- ("a", c_int * 3 * 3 * 3),
- ]
- T._fields_ = _fields_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement