o
    "4g                     @  s  U d Z ddlmZ ddlZddlmZmZmZ ddlm	Z
 ddlmZ ddlmZ eegef Zd	ed
< eegdf Zd	ed< eegef Zd	ed< eegdf Zd	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!ddZ-edde.d kre-ZdS dS )"z0
Utility functions to deal with binary structs.
    )annotationsN)CallablecastProtocol   )errors)Buffer)	TypeAliasr	   PackInt
tuple[int]	UnpackInt	PackFloatztuple[float]UnpackFloatc                   @  s   e Zd Zd
ddZd	S )	UnpackLendatar   start
int | Nonereturnr   c                 C  s   d S )N )selfr   r   r   r   X/var/www/html/authentication-server/venv/lib/python3.10/site-packages/psycopg/_struct.py__call__   s    zUnpackLen.__call__N)r   r   r   r   r   r   )__name__
__module____qualname__r   r   r   r   r   r      s    r   z!hz!Hz!iz!Iz!qz!fz!dxfloatr   bytesc                 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)r   r   r   r   )/__doc__
__future__r   structtypingr   r   r    r   r   abcr   _compatr	   intr   r
   __annotations__r   r   r   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    

	