grthtrhthjhtyjytjytkergtrhtrjytjerhrfh3 \Ðã@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.6/ctypes/_endian.pyrs    rcseZdZ‡fdd„Z‡ZS)Ú _swapped_metacsb|dkrPg}x>|D]6}|d}|d}|dd…}|j|t|ƒf|ƒqW|}tƒj||ƒdS)NZ_fields_réé)ÚappendrÚsuperÚ __setattr__)ÚselfZattrnameÚvalueZfieldsZdescÚnamer Úrest)Ú __class__r rrs  z_swapped_meta.__setattr__)Ú__name__Ú __module__Ú __qualname__rÚ __classcell__r r )rrrsrÚlittleZ __ctype_be__c@seZdZdZfZdZdS)ÚBigEndianStructurez$Structure with big endian byte orderN)rrrÚ__doc__Ú __slots__Ú_swappedbytes_r r r rr.sr)Ú metaclassZbigZ __ctype_le__c@seZdZdZfZdZdS)ÚLittleEndianStructurez'Structure with little endian byte orderN)rrrr r!r"r r r rr$7sr$zInvalid byteorder) ÚsysZctypesÚtypeZArrayrrr rÚ byteorderrr$rÚ RuntimeErrorr r r rÚs