o
    èó·i˜
  ã                   @   sÆ   d dl Z d dlmZ eƒ Ze d¡ de jv r!e jd dv r!dZndZee j 	e j 
e¡d¡ƒ�Ze ¡ Zejd	eg g d
¢ed� W d  ƒ n1 sKw   Y  G dd„ dƒZedkrae ¡  dS dS )é    N)ÚFFIa1  
    void* nvx_utf8vld_new ();

    void nvx_utf8vld_reset (void* utf8vld);

    int nvx_utf8vld_validate (void* utf8vld, const uint8_t* data, size_t length);

    void nvx_utf8vld_free (void* utf8vld);

    int nvx_utf8vld_set_impl(void* utf8vld, int impl);

    int nvx_utf8vld_get_impl(void* utf8vld);
ZAUTOBAHN_USE_NVX)Ú1ÚtrueFTz_utf8validator.cÚ_nvx_utf8validator)z-std=c99z-Wallz-Wno-strict-prototypesz-O3z-march=native)Ú	librariesÚextra_compile_argsÚoptionalc                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚUtf8Validatorz
    :noindex:
    c                 C   s6   t | _ ddlm} || _| j  | j ¡ | jj¡| _d S )Nr   )Úlib)Úffir   r
   ÚgcZnvx_utf8vld_newZnvx_utf8vld_freeÚ_vld)Úselfr
   © r   úaC:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\autobahn/nvx/_utf8validator.pyÚ__init__D   s   zUtf8Validator.__init__c                 C   s   | j  | j¡ d S )N)r
   Znvx_utf8vld_resetr   )r   r   r   r   ÚresetM   s   zUtf8Validator.resetc                 C   s*   | j  | j|t|ƒ¡}|dk|dkd d fS )Nr   )r
   Znvx_utf8vld_validater   Úlen)r   ÚbaÚresr   r   r   ÚvalidateP   s   zUtf8Validator.validateN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r	   ?   s
    	r	   Ú__main__)ÚosZcffir   r   ZcdefÚenvironr   ÚopenÚpathÚjoinÚdirnameÚ__file__ÚfdÚreadZc_sourceZ
set_sourcer	   r   Úcompiler   r   r   r   Ú<module>   s*   
ûþÿ