o
    6	f                     @   s(  U d Z ddlZddlmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ eegef Zeed	< ee
gee f Zeed
< eegef Zeed< ee
gee f Zeed< G dd deZeeedjZeeedjZeeedjZeeedjZeeedjZeeedjZ eeedjZ!eeedj"Z#eeedj"Z$eeedj"Z%eeedj"Z&eeedj"Z'eeedj"Z(eeedj"Z)edZ*eeegef e*jZ+eee*j,Z-dedefddZ.edde/dkre.Z dS dS )z0
Utility functions to deal with binary structs.
    N)CallablecastOptionalTuple)	TypeAlias   )Buffer)errors)ProtocolPackInt	UnpackInt	PackFloatUnpackFloatc                   @   s*   e Zd Zdedee dee fddZdS )	UnpackLendatastartreturnc                 C   s   d S )N )selfr   r   r   r   H/home/ertert/spirit/venv/lib/python3.10/site-packages/psycopg/_struct.py__call__   s    zUnpackLen.__call__N)__name__
__module____qualname__r   r   intr   r   r   r   r   r   r      s    "r   z!hz!Hz!iz!Iz!qz!fz!dxr   c                 C   s
   t d)Nzcannot dump Float4: Python affected by bug #304. Note that the psycopg-c and psycopg-binary packages are not affected by this issue. See https://github.com/psycopg/psycopg/issues/304)eInterfaceError)r   r   r   r   pack_float4_bug_304.   s   r   g      ?3f800000)0__doc__structtypingr   r   r   r   typing_extensionsr   abcr    r	   r   _compatr
   r   bytesr   __annotations__r   floatr   r   r   Structpack	pack_int2
pack_uint2	pack_int4
pack_uint4	pack_int8pack_float4pack_float8unpackunpack_int2unpack_uint2unpack_int4unpack_uint4unpack_int8unpack_float4unpack_float8_struct_lenpack_lenunpack_from
unpack_lenr   fromhexr   r   r   r   <module>   sB    
	