Viewing File: /opt/alt/python312/lib64/python3.12/ctypes/__pycache__/_endian.cpython-312.pyc
�
<��i� � �V � d dl Z d dl� ee� Zd� Z G d� d� Z G d� de ee� � Z G d� d e ee � � Z
e j d
k( r!dZeZ
G d� d
ee�� Ze Z G d� de e
�� Zye j dk( r!dZeZ G d� dee�� Z
e Z G d� de e
�� Zy ed� �)� N)�*c �� � t | t � rt | t � S t | t � r"t | j � | j z S t | t t f� r| S t d| 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 � � � e Zd Z� 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 �r r z_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 @r r r s
�� � -� -r r c � � e Zd Zy)�_swapped_struct_metaN�r% r&