Viewing File: /opt/alt/python312/lib64/python3.12/ctypes/__pycache__/_endian.cpython-312.pyc

�

<��i�	��V�ddlZddl�ee�Zd�ZGd�d�ZGd�deee��ZGd�d	eee	��Z
ejd
k(r!dZeZ
Gd�d
ee��Ze	ZGd�de	e
��Zyejdk(r!dZeZGd�dee��Z
e	ZGd�de	e
��Zyed��)�N)�*c���t|t�rt|t�St|t�r"t|j�|jzSt|ttf�r|Std|z��)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: %s)�hasattr�
_OTHER_ENDIAN�getattr�
isinstance�_array_type�
_other_endian�_type_�_length_�
issubclass�	Structure�Union�	TypeError)�typs �5/opt/alt/python312/lib64/python3.12/ctypes/_endian.pyr
r
sb���s�M�"��s�M�*�*��#�{�#��S�Z�Z�(�3�<�<�7�7��#�	�5�)�*��
�
�A�C�G�
H�H�c���eZdZ�fd�Z�xZS)�
_swapped_metac���|dk(r9g}|D]0}|d}|d}|dd}|j|t|�f|z��2|}t�|�
||�y)N�_fields_r��)�appendr
�super�__setattr__)	�self�attrname�value�fields�desc�namer�rest�	__class__s	        �rrz_swapped_meta.__setattr__sh����z�!��F����A�w���1�g���A�B�x���
�
�t�]�3�%7�8�4�?�@�	�
�E�
���H�e�,r)�__name__�
__module__�__qualname__r�
__classcell__)r$s@rrrs
���	-�	-rrc��eZdZy)�_swapped_struct_metaN�r%r&r'�rrr*r*"��rr*c��eZdZy)�_swapped_union_metaNr+r,rrr/r/#r-rr/�little�__ctype_be__c��eZdZdZdZdZy)�BigEndianStructurez$Structure with big endian byte orderr,N�r%r&r'�__doc__�	__slots__�_swappedbytes_r,rrr3r30s��2��	��rr3)�	metaclassc��eZdZdZdZdZy)�BigEndianUnionz Union with big endian byte orderr,Nr4r,rrr:r:7s��.��	��rr:�big�__ctype_le__c��eZdZdZdZdZy)�LittleEndianStructurez'Structure with little endian byte orderr,Nr4r,rrr>r>As��5��	��rr>c��eZdZdZdZdZy)�LittleEndianUnionz#Union with little endian byte orderr,Nr4r,rrr@r@Hs��1��	��rr@zInvalid byteorder)�sys�ctypes�type�Arrayr	r
rrr*rr/�	byteorderrr>r3r@r:�RuntimeErrorr,rr�<module>rGs���
���5�k��I�"
-�
-�A�=�$�y�/�@�;�-��e��;��=�=�H��"�M�%���Y�2F��
����*=��
	�]�]�e��"�M�"���	�5I��
�N��E�-@���*�
+�+r
Back to Directory File Manager