
BW                 @   s   d  Z  d d l m Z m Z m Z m Z d d l m Z d d   Z d d d  Z	 d	 d
   Z
 Gd d   d e  Z Gd d   d e  Z d S)z
FFI helper compatibility functions. Exports the following items:

 - LibraryNotFoundError
 - FFIEngineError
 - bytes_from_buffer()
 - buffer_from_bytes()
 - null()
    )unicode_literalsdivisionabsolute_importprint_function)create_string_bufferc             C   s
   t  |   S)N)r   )Zinitializer r   1/usr/lib/python3/dist-packages/asn1crypto/_ffi.pybuffer_from_bytes   s    r	   Nc             C   s   |  j  S)N)raw)buffermaxlenr   r   r   bytes_from_buffer   s    r   c               C   s   d  S)Nr   r   r   r   r   null   s    r   c               @   s   e  Z d  Z d Z d S)LibraryNotFoundErrorz;
    An exception when trying to find a shared library
    N)__name__
__module____qualname____doc__r   r   r   r   r      s   r   c               @   s   e  Z d  Z d Z d S)FFIEngineErrorz@
    An exception when trying to instantiate ctypes or cffi
    N)r   r   r   r   r   r   r   r   r   '   s   r   )r   Z
__future__r   r   r   r   Zctypesr   r	   r   r   	Exceptionr   r   r   r   r   r   <module>   s   "	