
    sKgh
                        d dl mZ d dlmZmZmZmZmZmZm	Z	  G d dej                        Z G d dej                        Zeegej                  j                  _        ej                   ej                  j                  _        ej                   gej                  j$                  _        ej                   gej                  j&                  _        ej(                  ej                  j&                  _        ej(                  gej                  j*                  _        ej(                  gej                  j,                  _        ej                   ej(                  gej                  j.                  _        eej                  j.                  _        ej(                  gej                  j0                  _        eej                  j0                  _        ej(                  gej                  j2                  _        eej                  j2                  _        ej(                  gej                  j4                  _        eej                  j4                  _        ej(                  gej                  j6                  _         e	e      ej                  j6                  _        ej(                  gej                  j8                  _        eej                  j8                  _        y)    )ffi)c_boolc_char_pc_charc_size_t	string_atc_uint64POINTERc                   <    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
y	)
SectionIteratorRefc                 @    t         j                  j                  |       S N)r   libLLVMPY_GetSectionNameselfs    `/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/llvmlite/binding/object_file.pynamezSectionIteratorRef.name       ww,,T22    c                 @    t         j                  j                  |       S r   )r   r   LLVMPY_IsSectionTextr   s    r   is_textzSectionIteratorRef.is_text
   s    ww++D11r   c                 @    t         j                  j                  |       S r   )r   r   LLVMPY_GetSectionSizer   s    r   sizezSectionIteratorRef.size   r   r   c                 @    t         j                  j                  |       S r   )r   r   LLVMPY_GetSectionAddressr   s    r   addresszSectionIteratorRef.address   s    ww//55r   c                 p    t        t        j                  j                  |       | j	                               S r   )r   r   r   LLVMPY_GetSectionContentsr   r   s    r   datazSectionIteratorRef.data   s$    ::4@$))+NNr   c                 B    t         j                  j                  ||       S r   )r   r   LLVMPY_IsSectionIteratorAtEnd)r   object_files     r   is_endzSectionIteratorRef.is_end   s    ww44[$GGr   c                 B    t         j                  j                  |        y r   )r   r   LLVMPY_MoveToNextSectionr   s    r   nextzSectionIteratorRef.next       ((.r   c                 B    t         j                  j                  |        y r   )r   r   LLVMPY_DisposeSectionIteratorr   s    r   _disposezSectionIteratorRef._dispose   s    --d3r   N)__name__
__module____qualname__r   r   r   r   r"   r&   r)   r-    r   r   r   r      s,    3236OH/4r   r   c                   8    e Zd Zed        Zed        Zd Zd Zy)ObjectFileRefc                 `     | t         j                  j                  |t        |                  S r   )r   r   LLVMPY_CreateObjectFilelen)clsr"   s     r   	from_datazObjectFileRef.from_data!   s"    377224TCDDr   c                     t        |d      5 }|j                         }d d d         | t        j                  j	                  t        |                  S # 1 sw Y   8xY w)Nrb)openreadr   r   r5   r6   )r7   pathfr"   s       r   	from_pathzObjectFileRef.from_path%   sG    $668D 377224TCDD s   AAc              #      K   t        t        j                  j                  |             }|j	                  |       s'| |j                          |j	                  |       s&y y wr   )r   r   r   LLVMPY_GetSectionsr&   r)   )r   its     r   sectionszObjectFileRef.sections+   sE      : :4 @A))D/HGGI ))D/s   AA$"A$c                 B    t         j                  j                  |        y r   )r   r   LLVMPY_DisposeObjectFiler   s    r   r-   zObjectFileRef._dispose1   r*   r   N)r.   r/   r0   classmethodr8   r?   rC   r-   r1   r   r   r3   r3       s6    E E E E
/r   r3   N)llvmlite.bindingr   ctypesr   r   r   r   r   r	   r
   	ObjectRefr   r3   r   r5   argtypesLLVMObjectFileRefrestyperE   rA   LLVMSectionIteratorRefr,   r(   r$   r   r   r   r!   r   r1   r   r   <module>rN      s
      4 44/CMM /* -5h+?   (*-*?*?   '-0-B-B,C     )'*'<'<&=   #%(%?%?   "252L2L1M % % .-0-G-G,H     ) 35527 % % .06 % % -*-*D*D)E   &(0   %*-*D*D)E   &(0   %-0-G-G,H     )+3     (.1.H.H-I ! ! *,3FO ! ! )),)C)C(D   %'-   $r   