
    f	                        d dl Z d dlT  ee          Zd Z G d d          Z G d de ee                    Z G d d	e ee	                    Z
e j        d
k    r(dZeZ G d dee          Ze	Z G d de	e
          ZdS e j        dk    r(dZeZ G d dee          Ze	Z G d de	e
          ZdS  ed          )    N)*c                    t          | t                    rt          | t                    S t          | t                    rt          | j                  | j        z  S t          | t          t          f          r| S t          d| z            )zReturn 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    #../lib/python3.11/ctypes/_endian.pyr
   r
      s     sM"" +sM***#{## 8SZ((3<77#	5)** 

ACG
H
HH    c                        e Zd Z fdZ xZS )_swapped_metac                     |dk    rJg }|D ]C}|d         }|d         }|dd          }|                     |t          |          f|z              D|}t                                          ||           d S )N_fields_r         )appendr
   super__setattr__)	selfattrnamevaluefieldsdescnamer   rest	__class__s	           r   r   z_swapped_meta.__setattr__   s    z!!F A AAw1gABBxt]3%7%784?@@@@EHe,,,,,r   )__name__
__module____qualname__r   __classcell__)r$   s   @r   r   r      s8        	- 	- 	- 	- 	- 	- 	- 	- 	-r   r   c                       e Zd ZdS )_swapped_struct_metaNr%   r&   r'    r   r   r*   r*   "             r   r*   c                       e Zd ZdS )_swapped_union_metaNr+   r,   r   r   r/   r/   #   r-   r   r/   little__ctype_be__c                       e Zd ZdZdZdZdS )BigEndianStructurez$Structure with big endian byte orderr,   Nr%   r&   r'   __doc__	__slots___swappedbytes_r,   r   r   r3   r3   0   s        22	r   r3   )	metaclassc                       e Zd ZdZdZdZdS )BigEndianUnionz Union with big endian byte orderr,   Nr4   r,   r   r   r:   r:   7   s        ..	r   r:   big__ctype_le__c                       e Zd ZdZdZdZdS )LittleEndianStructurez'Structure with little endian byte orderr,   Nr4   r,   r   r   r>   r>   A   s        55	r   r>   c                       e Zd ZdZdZdZdS )LittleEndianUnionz#Union with little endian byte orderr,   Nr4   r,   r   r   r@   r@   H   s        11	r   r@   zInvalid byteorder)sysctypestypeArrayr	   r
   r   r   r*   r   r/   	byteorderr   r>   r3   r@   r:   RuntimeErrorr,   r   r   <module>rG      s   



    d5kkI I I"
- 
- 
- 
- 
- 
- 
- 
- A @ @ @ @=$$y// @ @ @ ; ; ; ; ;-e ; ; ; =H"M%    Y2F    
     *=      
 	]e"M"    	5I    
 N    E-@       ,*
+
++r   