o
    @Bi	                     @   s   d dl mZ d dlZd dlmZ e Zed eej	ej
edZe Zejdeg g dd W d   n1 s?w   Y  G d	d
 d
ZedkrUe  dS dS )    )absolute_importN)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_utf8validator.c_nvx_utf8validator)z-std=c99z-Wallz-Wno-strict-prototypesz-O3z-march=native)	librariesextra_compile_argsc                   @   s$   e Zd Zdd Zdd Zdd ZdS )Utf8Validatorc                 C   sH   t | _ ddlm} || _| j | j | jj| _t| j| j d S )Nr   )lib)	ffir   r   gcnvx_utf8vld_newnvx_utf8vld_free_vldprintnvx_utf8vld_get_impl)selfr    r   [/var/www/html/Trade-python/venv/lib/python3.10/site-packages/autobahn/nvx/_utf8validator.py__init__=   s
   zUtf8Validator.__init__c                 C   s   | j | j d S )N)r   nvx_utf8vld_resetr   )r   r   r   r   resetF   s   zUtf8Validator.resetc                 C   s*   | j | j|t|}|dk|dkd d fS )Nr   )r   nvx_utf8vld_validater   len)r   baresr   r   r   validateI   s   zUtf8Validator.validateN)__name__
__module____qualname__r   r   r   r   r   r   r   r   ;   s    	r   __main__)
__future__r   oscffir   r	   cdefopenpathjoindirname__file__fdreadc_source
set_sourcer   r   compiler   r   r   r   <module>   s$   

