Your IP : 3.145.32.151


Current Path : /lib64/python3.6/ctypes/__pycache__/
Upload File :
Current File : //lib64/python3.6/ctypes/__pycache__/_endian.cpython-36.pyc

3


 \��@s�ddlZddlTee�Zdd�ZGdd�dee��Zejdkr\dZ	eZ
Gd	d
�d
eed�Zn0ejdkr�d
Z	eZGdd�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/_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�<module>s