%PDF- %PDF-
| Direktori : /usr/lib64/python3.9/site-packages/numpy/random/_examples/cffi/__pycache__/ |
| Current File : //usr/lib64/python3.9/site-packages/numpy/random/_examples/cffi/__pycache__/parse.cpython-39.pyc |
a
z[yc% � @ s d dl Z dd� ZdS )� Nc C s| t tj�|dd���H}g }|D ]}|�� �d�r2q|�|� q| �d�|�� W d � n1 sb0 Y t tj�|dd����}g }d}d}|D ]�}|r�|�� �d �r�d}q�|�� �d
�r�d}|�� �d�r�q�|�� �d�r�||�d
�7 }q�n(|dk�r||�d
�7 }||�d�8 }q�|� dd�}|� dd�}|� dd�}|�|� q�| �d�|�� W d � n1 �sn0 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.
Zrandomzbitgen.h�#�
Nzdistributions.hr Fz#endifz#ifdef __cplusplusTzstatic NPY_INLINE�{�}ZDECLDIR� Z
NPY_INLINEZ
RAND_INT_TYPEZint64_t)
�open�os�path�join�strip�
startswith�appendZcdef�count�replace)ZffiZinc_dirZfid�s�lineZin_skipZignoring� r �G/usr/lib64/python3.9/site-packages/numpy/random/_examples/cffi/parse.py�parse_distributions_h s@ .
r )r r r r r r �<module> s