U
    ¤½|e  ã                   @   sŒ   d dl mZmZmZmZ d dlmZ d dlmZ dd„ Z	dd„ Z
dd	„ Zeegejj_egejj_eejj_eeeƒgejj_eejj_d
S )é    )Úc_void_pÚc_char_pÚc_boolÚPOINTER)Úffi)Ú_encode_stringc                 C   s   t j t| ƒ¡S )z{
    Get the in-process address of symbol named *name*.
    An integer is returned, or None if the symbol isn't found.
    )r   ÚlibÚLLVMPY_SearchAddressOfSymbolr   )Úname© r   úS/var/www/website-v5/atlas_env/lib/python3.8/site-packages/llvmlite/binding/dylib.pyÚaddress_of_symbol   s    r   c                 C   s   t j t| ƒt|ƒ¡ dS )z…
    Register the *address* of global symbol *name*.  This will make
    it usable (e.g. callable) from LLVM-compiled functions.
    N)r   r   ÚLLVMPY_AddSymbolr   r   )r
   Úaddressr   r   r   Ú
add_symbol   s    r   c              	   C   s6   t  ¡ �$}t j t| ƒ|¡r(tt|ƒƒ‚W 5 Q R X dS )z"
    Load an external library
    N)r   ÚOutputStringr   ÚLLVMPY_LoadLibraryPermanentlyr   ÚRuntimeErrorÚstr)ÚfilenameZouterrr   r   r   Úload_library_permanently   s    
 ÿr   N)Úctypesr   r   r   r   Úllvmlite.bindingr   Zllvmlite.binding.commonr   r   r   r   r   r   Úargtypesr	   Úrestyper   r   r   r   r   Ú<module>   s   þ

