Class-level field descriptor exposed on Structure / Union subclasses
(S.field.offset, S.field.size, bitfield info), mirroring CPython's ctypes.CField.
A class declared with class S extends Structure { static _fields_ = ... }
has these descriptors as statics (S.x.offset), but TypeScript cannot
derive static members from _fields_: use CFieldsOf
((S as typeof S & CFieldsOf<"x" | "y">).x.offset). Classes returned by
defineStruct / defineUnion expose them typed.
S.x instanceof CField holds. The constructor is internal API, as in
CPython: it takes the keyword arguments as one object and requires
_internal_use: true; a byte_size other than sizeof(type) or a bit
field that overflows its type throws RangeError (Python ValueError).
Class-level field descriptor exposed on Structure / Union subclasses (
S.field.offset,S.field.size, bitfield info), mirroring CPython'sctypes.CField.A class declared with
class S extends Structure { static _fields_ = ... }has these descriptors as statics (S.x.offset), but TypeScript cannot derive static members from_fields_: use CFieldsOf ((S as typeof S & CFieldsOf<"x" | "y">).x.offset). Classes returned by defineStruct / defineUnion expose them typed.S.x instanceof CFieldholds. The constructor is internal API, as in CPython: it takes the keyword arguments as one object and requires_internal_use: true; abyte_sizeother thansizeof(type)or a bit field that overflows its type throwsRangeError(PythonValueError).