grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ´iÐã@s�ddlZddlTeeƒZdd„ZGdd„deeƒƒZejdkr\dZ eZ Gd d „d eed �Z n0ejd kr„d Z eZ Gdd„deed �Z ne dƒ‚dS)éN)Ú*cCsLt|tƒrt|tƒSt|tƒr.t|jƒ|jSt|t ƒr<|St d|ƒ‚dS)zïReturn 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: %sN) ÚhasattrÚ _OTHER_ENDIANÚgetattrÚ isinstanceÚ _array_typeÚ _other_endianZ_type_Z_length_Ú issubclassÚ StructureÚ TypeError)Útyp©r ú&/usr/lib64/python3.9/ctypes/_endian.pyrs    rcseZdZ‡fdd„Z‡ZS)Ú _swapped_metacs^|dkrLg}|D]6}|d}|d}|dd…}| |t|ƒf|¡q|}tƒ ||¡dS)NZ_fields_réé)ÚappendrÚsuperÚ __setattr__)ÚselfÚattrnameÚvalueÚfieldsZdescÚnamer Úrest©Ú __class__r rrs z_swapped_meta.__setattr__)Ú__name__Ú __module__Ú __qualname__rÚ __classcell__r r rrrsrÚlittleZ __ctype_be__c@seZdZdZdZdZdS)ÚBigEndianStructurez$Structure with big endian byte orderr N©rrrÚ__doc__Ú __slots__Z_swappedbytes_r r r rr".sr")Ú metaclassÚbigZ __ctype_le__c@seZdZdZdZdZdS)ÚLittleEndianStructurez'Structure with little endian byte orderr Nr#r r r rr(7sr(zInvalid byteorder) ÚsysZctypesÚtypeÚArrayrrr rÚ byteorderrr(r"Ú RuntimeErrorr r r rÚs