Hacked By AnonymousFox

Current Path : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/xdrlib.cpython-311.opt-1.pyc

�

c��fY����dZddlZddlmZddlmZddlZejed���gd�Z	Gd�d	e
��ZGd
�de��Zd�Z
Gd
�d��ZGd�d��ZdS)zRImplements (a subset of) Sun XDR -- eXternal Data Representation.

See: RFC 1014

�N)�BytesIO��wraps)��
)�remove)�Error�Packer�Unpacker�ConversionErrorc�$�eZdZdZd�Zd�Zd�ZdS)r	z�Exception class for this module. Use:

    except xdrlib.Error as var:
        # var has the Error instance for the exception

    Public ivars:
        msg -- contains the message

    c��||_dS�N)�msg)�selfrs  �-/opt/alt/python311/lib64/python3.11/xdrlib.py�__init__zError.__init__s
�������c�*�t|j��Sr)�reprr�rs r�__repr__zError.__repr__s���D�H�~�~�rc�*�t|j��Sr)�strrrs r�__str__z
Error.__str__s���4�8�}�}�rN)�__name__�
__module__�__qualname__�__doc__rrr�rrr	r	sK������������������rr	c��eZdZdS)rN)rrrr rrrr#s�������Drrc�<��t����fd���}|S)z5 Wrap any raised struct.errors in a ConversionError. c���	�||��S#tj$r }t|jd��d�d}~wwxYw�Nr)�struct�errorr�args)r�value�e�functions   �r�resultz&raise_conversion_error.<locals>.result)sQ���	7��8�D�%�(�(�(���|�	7�	7�	7�!�!�&��)�,�,�$�6�����	7���s��>�9�>r)r*r+s` r�raise_conversion_errorr,&s5����8�_�_�7�7�7�7��_�7�
�Mrc��eZdZdZd�Zd�Zd�ZeZed���Z	ed���Z
e
Zd�Zd�Z
e
Zed	���Zed
���Zd�ZeZd�ZeZeZd
�Zd�Zd�ZdS)r
z0Pack various data representations into a buffer.c�.�|���dSr��resetrs rrzPacker.__init__5s���
�
�����rc�,�t��|_dSr)r�_Packer__bufrs rr0zPacker.reset8s���Y�Y��
�
�
rc�4�|j���Sr)r2�getvaluers r�
get_bufferzPacker.get_buffer;s���z�"�"�$�$�$rc�`�|j�tjd|����dS)N�>L�r2�writer%�pack�r�xs  r�	pack_uintzPacker.pack_uint@�*���
�����T�1�-�-�.�.�.�.�.rc�`�|j�tjd|����dS)N�>lr8r;s  r�pack_intzPacker.pack_intDr>rc�v�|r|j�d��dS|j�d��dS)Nss)r2r9r;s  r�	pack_boolzPacker.pack_boolJsA���	,�d�j���{�+�+�+�+�+��j���{�+�+�+�+�+rc�V�	|�|dz	dz��n9#ttjf$r }t	|jd��d�d}~wwxYw	|�|dz��dS#ttjf$r }t	|jd��d�d}~wwxYw)N� l��r)r=�	TypeErrorr%r&rr')rr<r)s   r�pack_uhyperzPacker.pack_uhyperNs���	7��N�N�1�b�5�:�-�.�.�.�.���6�<�(�	7�	7�	7�!�!�&��)�,�,�$�6�����	7����	7��N�N�1�z�>�*�*�*�*�*���6�<�(�	7�	7�	7�!�!�&��)�,�,�$�6�����	7���s,��A�A�A�A2�2B(�B#�#B(c�`�|j�tjd|����dS)N�>fr8r;s  r�
pack_floatzPacker.pack_floatZr>rc�`�|j�tjd|����dS)N�>dr8r;s  r�pack_doublezPacker.pack_double^r>rc��|dkrtd���|d|�}|dzdzdz}||t|��z
dzz}|j�|��dS)Nr� fstring size must be nonnegativer��)�
ValueError�lenr2r9)r�n�s�datas    r�pack_fstringzPacker.pack_fstringbsm���q�5�5��?�@�@�@���!��u����c�A�X�q�L���q�3�t�9�9�}��-�-���
��������rc�z�t|��}|�|��|�||��dSr)rSr=rW)rrUrTs   r�pack_stringzPacker.pack_stringls;����F�F�����q�������!�Q�����rc�z�|D]"}|�d��||���#|�d��dS)N�r)r=)r�list�	pack_item�items    r�	pack_listzPacker.pack_listtsJ���	�	�D��N�N�1�����I�d�O�O�O�O����q�����rc�j�t|��|krtd���|D]
}||���dS)Nzwrong array size)rSrR)rrTr\r]r^s     r�pack_farrayzPacker.pack_farrayzsH���t�9�9��>�>��/�0�0�0��	�	�D��I�d�O�O�O�O�	�	rc�|�t|��}|�|��|�|||��dSr)rSr=ra)rr\r]rTs    r�
pack_arrayzPacker.pack_array�s=����I�I�����q��������D�)�,�,�,�,�,rN)rrrrrr0r5�get_bufr,r=rA�	pack_enumrCrG�
pack_hyperrJrMrW�pack_fopaquerY�pack_opaque�
pack_bytesr_rarcr rrr
r
2sD������:�:�������%�%�%��G��/�/���/��/�/���/��I�,�,�,�7�7�7��J��/�/���/��/�/���/���� �L� � � �
�K��J�������-�-�-�-�-rr
c��eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZeZd
�Z
d�Zd�Zd
�Zd�Zd�ZeZd�ZeZeZd�Zd�Zd�ZdS)rz;Unpacks various data representations from the given buffer.c�0�|�|��dSrr/�rrVs  rrzUnpacker.__init__�s���
�
�4�����rc�"�||_d|_dSr$)�_Unpacker__buf�_Unpacker__posrls  rr0zUnpacker.reset�s����
���
�
�
rc��|jSr�rors r�get_positionzUnpacker.get_position��
���z�rc��||_dSrrq)r�positions  r�set_positionzUnpacker.set_position�s
����
�
�
rc��|jSr)rnrs rr5zUnpacker.get_buffer�rsrc�^�|jt|j��krtd���dS)Nzunextracted data remains)rorSrnr	rs r�donez
Unpacker.done�s.���:��D�J���'�'��2�3�3�3�(�'rc��|j}|dzx|_}|j||�}t|��dkrt�t	jd|��dS)NrPr7r�rornrS�EOFErrorr%�unpack�r�i�jrVs    r�unpack_uintzUnpacker.unpack_uint��S���J���1����
�Q��z�!�A�#����t�9�9�q�=�=��N��}�T�4�(�(��+�+rc��|j}|dzx|_}|j||�}t|��dkrt�t	jd|��dS)NrPr@rr{r~s    r�
unpack_intzUnpacker.unpack_int�r�rc�D�t|�����Sr)�boolr�rs r�unpack_boolzUnpacker.unpack_bool�s���D�O�O�%�%�&�&�&rc�|�|���}|���}t|��dz|zS)NrE)r��int)r�hi�los   r�
unpack_uhyperzUnpacker.unpack_uhyper�s9��
�
�
�
�
��
�
�
�
�
���2�w�w��{�R��rc�D�|���}|dkr|dz
}|S)Nll)r�r;s  r�unpack_hyperzUnpacker.unpack_hyper�s/����� � ���"�"�"��'�'�A��rc��|j}|dzx|_}|j||�}t|��dkrt�t	jd|��dS)NrPrIrr{r~s    r�unpack_floatzUnpacker.unpack_float�r�rc��|j}|dzx|_}|j||�}t|��dkrt�t	jd|��dS)N�rLrr{r~s    r�
unpack_doublezUnpacker.unpack_double�r�rc���|dkrtd���|j}||dzdzdzz}|t|j��krt�||_|j|||z�S)NrrOrrP)rRrorSrnr|)rrTrr�s    r�unpack_fstringzUnpacker.unpack_fstring�sj���q�5�5��?�@�@�@��J��
��1��q���
�N���s�4�:������N���
��z�!�A�a�C�%� � rc�T�|���}|�|��Sr)r�r�)rrTs  r�
unpack_stringzUnpacker.unpack_string�s'���������"�"�1�%�%�%rc��g}	|���}|dkrn8|dkrtd|�����|��}|�|���S|S)Nr[rz0 or 1 expected, got )r�r�append)r�unpack_itemr\r<r^s     r�unpack_listzUnpacker.unpack_list�so����	�� � �"�"�A��A�v�v�u��A�v�v�%�o�1�1�&F�G�G�G��;�=�=�D��K�K�����
	��rc�h�g}t|��D]}|�|����� |Sr)�ranger�)rrTr�r\rs     r�
unpack_farrayzUnpacker.unpack_farray�s<�����q���	'�	'�A��K�K���
�
�&�&�&�&��rc�V�|���}|�||��Sr)r�r�)rr�rTs   r�unpack_arrayzUnpacker.unpack_array�s)���������!�!�!�[�1�1�1rN)rrrrrr0rrrvr5ryr�r��unpack_enumr�r�r�r�r�r��unpack_fopaquer��
unpack_opaque�unpack_bytesr�r�r�r rrrr�sB������E�E����������������4�4�4�,�,�,�,�,�,��K�'�'�'� � � �
���,�,�,�,�,�,�!�!�!�$�N�&�&�&�"�M� �L�	�	�	����2�2�2�2�2rr)rr%�ior�	functoolsr�warnings�_deprecatedr�__all__�	Exceptionr	rr,r
rr rr�<module>r�s:�����
�
�
��������������������X�g�.�.�.�.�
<�
<�
<�������I����$	�	�	�	�	�e�	�	�	�	�	�	�Q-�Q-�Q-�Q-�Q-�Q-�Q-�Q-�jm2�m2�m2�m2�m2�m2�m2�m2�m2�m2r

Hacked By AnonymousFox1.0, Coded By AnonymousFox