Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/site-packages/hgext/fsmonitor/pywatchman/__pycache__/ |
Upload File : |
a �+�b� � @ sf d dl mZmZmZ d dlZzddlmZ W n eyJ ddlmZ Y n0 dZ dd� Z dd d�ZdS ) � )�absolute_import�division�print_functionN� )�bser)�pybsers c C sV d}t |�}|dkrR| �tj| �||��}|du s<|dkr@|S ||7 }||8 }q|S )z�Read bytes from a file-like object @param fp: File-like object that implements read(int) @type fp: file @param buf: Buffer to read into @type buf: bytes @return: buf r N)�len�readinto�ctypes�c_char�from_buffer)�fp�buf�offsetZ remaining�l� r �E/usr/lib64/python3.9/site-packages/hgext/fsmonitor/pywatchman/load.py�_read_bytes, s r Tc C s� t �d�}tt�}t j| �|�}t| |�}|t|�k r<dS t�|�}|t|�kr^t � ||� t j|t|� �|t|��} t| | �}|t| �k r�t d��t�t j| �|d�|||�S )at Deserialize a BSER-encoded blob. @param fp: The file-object to deserialize. @type file: @param mutable: Whether to return mutable results. @type mutable: bool @param value_encoding: Optional codec to use to decode values. If unspecified or None, return values as bytestrings. @type value_encoding: str @param value_errors: Optional error handler for codec. 'strict' by default. The other most common argument is 'surrogateescape' on Python 3. If value_encoding is None, this is ignored. @type value_errors: str i Nzbser data ended earlyr )r Zcreate_string_bufferr �EMPTY_HEADERr r r r Zpdu_lenZresize�RuntimeError�loads) r ZmutableZvalue_encodingZvalue_errorsr ZSNIFF_BUFFER_SIZE�headerZread_lenZ total_len�bodyr r r �loadD s* � �r )TNN)Z __future__r r r r � r �ImportErrorr r r r r r r r �<module> s