File: //lib/python3/dist-packages/numpy/random/_examples/cffi/__pycache__/parse.cpython-310.pyc
o
6��a% � @ s d dl Z dd� ZdS )� Nc C sx t tj�|dd���$}g }|D ]}|�� �d�rq|�|� q| �d�|�� W d � n1 s1w Y t tj�|dd���r}g }d}d}|D ]X}|rW|�� �d �rVd}qI|�� �d
�r`d}|�� �d�rhqI|�� �d�rw||�d
�7 }qI|dkr�||�d
�7 }||�d�8 }qI|� dd�}|� dd�}|� dd�}|�|� qI| �d�|�� W d � dS 1 s�w Y dS )z�
Parse distributions.h located in inc_dir for CFFI, filling in the ffi.cdef
Read the function declarations without the "#define ..." macros that will
be filled in when loading the library.
�randomzbitgen.h�#�
Nzdistributions.hr Fz#endifz#ifdef __cplusplusTzstatic NPY_INLINE�{�}�DECLDIR� �
NPY_INLINE�
RAND_INT_TYPE�int64_t)
�open�os�path�join�strip�
startswith�append�cdef�count�replace)�ffi�inc_dir�fid�s�line�in_skip�ignoring� r �C/usr/lib/python3/dist-packages/numpy/random/_examples/cffi/parse.py�parse_distributions_h sD � "�r )r
r r r r r �<module> s