Xe *ddlZddlTeeZdZGddZGddeeeZGdd eee Z ej d kr(d Z eZ Gd d eeZe ZGdde e ZdSej dkr(dZ eZGddeeZ e ZGdde e ZdSed)N)*ct|trt|tSt|trt |j|jzSt|ttfr|Std|z)zReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. z+This type does not support other endian: %s) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endian_type__length_ issubclass StructureUnion TypeError)typs 5/opt/alt/python311/lib64/python3.11/ctypes/_endian.pyr r ssM""+sM***#{##8SZ((3<77# 5)** ACG H HHceZdZfdZxZS) _swapped_metac|dkrJg}|D]C}|d}|d}|dd}||t|f|zD|}t||dS)N_fields_r)appendr super __setattr__) selfattrnamevaluefieldsdescnamerrest __class__s rrz_swapped_meta.__setattr__s z ! !F A AAw1gABBx t]3%7%784?@@@@E He,,,,,r)__name__ __module__ __qualname__r __classcell__)r$s@rrrs8 - - - - - - - - -rrceZdZdS)_swapped_struct_metaNr%r&r'rrr*r*"rr*ceZdZdS)_swapped_union_metaNr+r,rrr/r/#r-rr/little __ctype_be__ceZdZdZdZdZdS)BigEndianStructurez$Structure with big endian byte orderr,Nr%r&r'__doc__ __slots___swappedbytes_r,rrr3r30s22 rr3) metaclassceZdZdZdZdZdS)BigEndianUnionz Union with big endian byte orderr,Nr4r,rrr:r:7s.. rr:big __ctype_le__ceZdZdZdZdZdS)LittleEndianStructurez'Structure with little endian byte orderr,Nr4r,rrr>r>As55 rr>ceZdZdZdZdZdS)LittleEndianUnionz#Union with little endian byte orderr,Nr4r,rrr@r@Hs11 rr@zInvalid byteorder)sysctypestypeArrayr r rrr*rr/ byteorderrr>r3r@r: RuntimeErrorr,rrrGs d5kk III" - - - - - - - -A@@@@=$$y//@@@;;;;;-e;;;=H"M%Y2F *=  ]e"M" 5I NE-@ ,* + ++r