Your IP : 13.58.61.176
3
M��Z4h � @ sH d dl Z d dlZd dlZddlmZ ddlmZ G dd� de�ZdZ dS )� N� )�model)�VerificationErrorc @ s� e Zd ZdZdZdd� Zdd� Zdd� Zd d
� ZdZdd
�Z dd� Z
d[dd�Zdd� Zdd� Z
dd� Zdd� Zdd� ZeZeZeZdd� ZeZdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zd1d2� Zd3d4� Z d5d6� Z!d7d8� Z"d9d:� Z#d\d=d>�Z$d?d@� Z%eZ&d]dAdB�Z'dCdD� Z(dEdF� Z)dGdH� Z*dIdJ� Z+d^dLdM�Z,d_dNdO�Z-dPdQ� Z.dRdS� Z/eZ0dTdU� Z1dVdW� Z2eZ3dXdY� Z4d;S )`�VGenericEngine�gFc C s || _ |j| _g | _i | _d S )N)�verifier�ffi�export_symbols�_struct_pending_verification)�selfr � r �#/usr/lib64/python3.6/vengine_gen.py�__init__ s zVGenericEngine.__init__c C s |j d| j� d S )Nr )�
setdefaultr )r �kwdsr r r
�patch_extension_kwds s z#VGenericEngine.patch_extension_kwdsc C sT xN|D ]F}|| }|d kr t j}x*|D ]"}tjj||�}tjj|�r&|S q&W qW d S )N)�sys�path�os�join�isfile)r Zmodule_namer Zso_suffixesZ so_suffix�basename�dirname�filenamer r r
�find_module s
zVGenericEngine.find_modulec C s d S )Nr )r r r r
�
collect_types% s zVGenericEngine.collect_types� c C s | j j|d � d S )N�
)Z_f�write)r Zwhatr r r
�_prnt( s zVGenericEngine._prntc C s` | j }|t� || jj� | jd� tjdkr\tjdkr>d}nd}| jj� }|d||f � d S )NZdeclZwin32� ZPyInit_Zinitzvoid %s%s(void) { }
)r ) r �cffimod_headerr Zpreamble� _generater �platform�version_infoZget_module_name)r �prnt�prefix�modnamer r r
�write_source_to_f+ s
z VGenericEngine.write_source_to_fr c sj �j j}tjjtj�jj�}|j||���j �d� G � ��fdd�dt
j�� � d�}�j �d|d� |S )NZloadingc s&