o
    Zh                     @   s&   d Z ddlmZ dedefddZdS )zUUtils for interoperability with other libraries.

Just CFFI pointer casting for now.
    )Anynreturnc                 C   sb   t | tr| S zddl}W n	 ty   Y nw | }t | |jr)t|d| S td| d)zZCast an address to a Python int

    This could be a Python integer or a CFFI pointer
    r   NZsize_tzCannot cast z to int)
isinstanceintcffiImportErrorZFFIZCDatacast
ValueError)r   r   ffi r   H/var/www/html/lang_env/lib/python3.10/site-packages/zmq/utils/interop.pycast_int_addr   s   
r   N)__doc__typingr   r   r   r   r   r   r   <module>   s    