[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.133.118.164: ~ $
U

ل=^�T�@s�ddlZddlZddlmZddlmZmZmZdZdZ	dZ
dd�ZGd	d
�d
e�Z
Gdd�de
�ZGd
d�de�Ze�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Zee�Zdd �Zee�ZGd!d"�d"e�ZGd#d$�d$e�Zeed%�d�ZGd&d'�d'e
�ZGd(d)�d)e�Z Gd*d+�d+e �Z!Gd,d-�d-e �Z"Gd.d/�d/e�Z#d<d0d1�Z$d=d2d3�Z%e�Z&e�'�Z(d4d5�Z)d6d7�Z*d8d9�Z+d:d;�Z,dS)>�N�)�
allocate_lock)�	CDefError�VerificationError�VerificationMissing��cCs@|t@rd|��}|t@r(d|��}|t@r<d|��}|S)Nz const z
 volatile z __restrict )�Q_CONST�lstrip�
Q_VOLATILE�
Q_RESTRICT)�quals�replace_with�r�	/model.py�qualifysrc@sPeZdZdZdZddd�Zdd�Zd	d
�Zdd�Zdd
d�Z	dd�Z
dd�ZdS)�BaseTypeByIdentityF��a C filercCsx|j}|��}|rB|�d�r.d|kr.d|}n|ddkrBd|}t||�}|�d|�}d|krttd	|��|f��|S)
N�*z&[�(%s)rz[(� �&�$z-cannot generate '%s' in %s: unknown type name)�c_name_with_marker�strip�
startswithr�replacer�_get_c_name)�selfr�contextr
�resultrrr�
get_c_names 


��zBaseTypeByIdentity.get_c_namecCs|j�dd�S)Nrr)rr�rrrrr/szBaseTypeByIdentity._get_c_namecCsd|��kS)Nr�rr#rrr�
has_c_name2szBaseTypeByIdentity.has_c_namecCsdS�NFrr#rrr�is_integer_type5sz"BaseTypeByIdentity.is_integer_typecCsBz|j|}Wn.tk
r<|�||�}|j�||�}YnX|S�N)�_cached_btypes�KeyError�build_backend_type�
setdefault)r�ffi�
finishlist�	can_delay�BTypeZBType2rrr�get_cached_btype8sz#BaseTypeByIdentity.get_cached_btypecCsd|��fS)Nz<%s>r$r#rrr�__repr__AszBaseTypeByIdentity.__repr__cs�fdd��jD�S)Ncsg|]}|t�|�f�qSr)�getattr)�.0�namer#rr�
<listcomp>Esz1BaseTypeByIdentity._get_items.<locals>.<listcomp>)�_attrs_r#rr#r�
_get_itemsDszBaseTypeByIdentity._get_itemsN)rrr)F)�__name__�
__module__�__qualname__�
is_array_type�is_raw_functionr"rr%r'r1r2r8rrrrrs

	rc@s$eZdZdd�Zdd�Zdd�ZdS)�BaseTypecCs|j|jko|��|��kSr()�	__class__r8�r�otherrrr�__eq__Js�zBaseType.__eq__cCs
||kSr(rr@rrr�__ne__NszBaseType.__ne__cCst|jt|���f�Sr()�hashr?�tupler8r#rrr�__hash__QszBaseType.__hash__N)r9r:r;rBrCrFrrrrr>Hsr>c@s eZdZdZdd�Zdd�ZdS)�VoidTypercCs
d|_dS)Nzvoid&�rr#rrr�__init__XszVoidType.__init__cCst||d�S)NZ
new_void_type��global_cache�rr-r.rrrr+[szVoidType.build_backend_typeN�r9r:r;r7rIr+rrrrrGUsrGc@seZdZdd�ZdS)�BasePrimitiveTypecCsdSr&rr#rrr�is_complex_typebsz!BasePrimitiveType.is_complex_typeN)r9r:r;rOrrrrrNasrNc4@s�eZdZdZdddddddddddddddddddddddddddddddddddddddddddddddddddd�3Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dS)�
PrimitiveType�r5�c�i�f�j)3�charZshort�int�longz	long longzsigned charz
unsigned charzunsigned short�unsigned int�
unsigned longzunsigned long long�floatZdoublezlong doublezfloat _Complexzdouble _ComplexZ_BoolZwchar_tZchar16_tZchar32_tZint8_tZuint8_tZint16_tZuint16_tZint32_tZuint32_tZint64_tZuint64_tZint_least8_tZ
uint_least8_tZ
int_least16_tZuint_least16_tZ
int_least32_tZuint_least32_tZ
int_least64_tZuint_least64_tZint_fast8_tZuint_fast8_tZint_fast16_tZ
uint_fast16_tZint_fast32_tZ
uint_fast32_tZint_fast64_tZ
uint_fast64_tZintptr_tZ	uintptr_tZintmax_tZ	uintmax_tZ	ptrdiff_tZsize_tZssize_tcCs||_|d|_dS�Nr�r5r�rr5rrrrI�szPrimitiveType.__init__cCs|j|jdkS)NrR��ALL_PRIMITIVE_TYPESr5r#rrr�is_char_type�szPrimitiveType.is_char_typecCs|j|jdkS)NrSr_r#rrrr'�szPrimitiveType.is_integer_typecCs|j|jdkS)NrTr_r#rrr�
is_float_type�szPrimitiveType.is_float_typecCs|j|jdkS)NrUr_r#rrrrO�szPrimitiveType.is_complex_typecCst||d|j�S)NZnew_primitive_type)rKr5rLrrrr+�sz PrimitiveType.build_backend_typeN)r9r:r;r7r`rIrar'rbrOr+rrrrrPfsv�7rPc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�UnknownIntegerTyperQcCs||_|d|_dSr\r]r^rrrrI�szUnknownIntegerType.__init__cCsdS)NTrr#rrrr'�sz"UnknownIntegerType.is_integer_typecCstd|j��dS)Nz4integer type '%s' can only be used after compilation��NotImplementedErrorr5rLrrrr+�s�z%UnknownIntegerType.build_backend_typeN)r9r:r;r7rIr'r+rrrrrc�srcc@s eZdZdZdd�Zdd�ZdS)�UnknownFloatTyperQcCs||_|d|_dSr\r]r^rrrrI�szUnknownFloatType.__init__cCstd|j��dS)Nz2float type '%s' can only be used after compilationrdrLrrrr+�s�z#UnknownFloatType.build_backend_typeNrMrrrrrf�srfc@seZdZdZddd�ZdS)�BaseFunctionType)�argsr!�ellipsis�abiNcCs�||_||_||_||_dd�|jD�}|jr8|�d�|p@dg}|jd�|�f}|dk	r||dd�|d|dd�}|jj�d|�|_dS)	NcSsg|]}|���qSrr$)r4�argrrrr6�sz-BaseFunctionType.__init__.<locals>.<listcomp>�...Zvoidz, rrr)	rhr!rirj�append�
_base_pattern�joinrr)rrhr!rirjZreprargsrrrrrI�s

 �zBaseFunctionType.__init__)N�r9r:r;r7rIrrrrrg�srgc@s$eZdZdZdZdd�Zdd�ZdS)�RawFunctionTypez(&)(%s)TcCstd|f��dS)NzPcannot render the type %r: it is a function type, not a pointer-to-function type)rrLrrrr+�s�z"RawFunctionType.build_backend_typecCst|j|j|j|j�Sr()�FunctionPtrTyperhr!rirjr#rrr�as_function_pointer�sz#RawFunctionType.as_function_pointerN)r9r:r;rnr=r+rsrrrrrq�srqc@s eZdZdZdd�Zdd�ZdS)rrz(*&)(%s)cCs�|j�||�}g}|jD]}|�|�||��qd}|jdkrh|jshz|jjf}Wntk
rfYnXt	||dt
|�||jf|��S)NrZ	__stdcallZnew_function_type)r!r1rhrmrjri�_backendZFFI_STDCALL�AttributeErrorrKrE)rr-r.r!rh�tpZabi_argsrrrr+�s$

��z"FunctionPtrType.build_backend_typecCst|j|j|j|j�Sr()rqrhr!rirjr#rrr�as_raw_functionszFunctionPtrType.as_raw_functionN)r9r:r;rnr+rwrrrrrr�srrc@s"eZdZdZddd�Zdd�ZdS)	�PointerType)�totyper
rcCs>||_||_t|d�}|jr*d|��f}|j�d|�|_dS)Nz *&rr)ryr
rr<r
rr)rryr
ZextrarrrrIs
zPointerType.__init__cCs |jj||dd�}t||d|�S)NT)r/�new_pointer_type)ryr1rK)rr-r.ZBItemrrrr+szPointerType.build_backend_typeN)rrMrrrrrxs
rxcCs
t|t�Sr()rxr	)ryrrr�ConstPointerTypesr{c@seZdZdZddd�ZdS)�NamedPointerType)ryr5rcCs"t�|||�||_|d|_dSr\)rxrIr5r)rryr5r
rrrrIszNamedPointerType.__init__N)rrprrrrr|sr|c@s,eZdZdZdZdd�Zdd�Zdd�Zd	S)
�	ArrayType)�item�lengthTcCsF||_||_|dkrd}n|dkr(d}nd|}|jj�d|�|_dS)Nz&[]rlz
&[/*...*/]z&[%s]r)r~rrr)rr~rZbracketsrrrrI)s�zArrayType.__init__cCst|j|�Sr()r}r~)rZ	newlengthrrr�resolve_length6szArrayType.resolve_lengthcCsJ|jdkrtd|f��|j�||�t|j��||�}t||d||j�S)Nrlz)cannot render the type %r: unknown lengthZnew_array_type)rrr~r1rxrK)rr-r.ZBPtrItemrrrr+9s
�zArrayType.build_backend_typeN)r9r:r;r7r<rIr�r+rrrrr}%s

r}rVc@s,eZdZdZdZdd�Zdd�Zdd�ZdS)	�StructOrUnionOrEnumrQNcCs$|jpd|j|jf}|d|_dS)Nz%s %sr)�	forcename�kindr5rr^rrr�build_c_name_with_markerHsz,StructOrUnionOrEnum.build_c_name_with_markercCs||_|��dSr()r�r�)rr�rrr�force_the_nameLsz"StructOrUnionOrEnum.force_the_namecCs|jdd�S)N���rHr#rrr�get_official_namePsz%StructOrUnionOrEnum.get_official_name)r9r:r;r7r�r�r�r�rrrrr�Ds
r�c@sjeZdZdZdZdZdZddd�Zdd�Zdd	d
�Z	dd�Z
dd
d�Zdd�Zdd�Z
dd�Zdd�ZdS)�
StructOrUnionNrFcCs*||_||_||_||_||_|��dSr()r5�fldnames�fldtypes�
fldbitsize�fldqualsr�)rr5r�r�r�r�rrrrI[szStructOrUnion.__init__ccs>|jdk	r:t|j|j�D] \}}|dkrt|t�r|VqdS)Nr)r��zipr��
isinstancer�)rr5�typerrr�anonymous_struct_fieldscs
z%StructOrUnion.anonymous_struct_fieldsTccs||j}|dkrdt|j�}t|j|j|j|�D]F\}}}}|dkrht|t�rh|rh|��D]
}|VqZq0||||fVq0dS)N)rr)	r��lenr�r�r�r�r�r��
enumfields)rZexpand_anonymous_struct_unionr�r5r��bitsizer
r!rrrr�is
��
zStructOrUnion.enumfieldsc	Cszg}g}g}g}|��D]4\}}}}|�|�|�|�|�|�|�|�qt|�|_t|�|_t|�|_t|�|_dSr()r�rmrEr�r�r�r�)	r�names�typesZbitsizesr�r5r�r�r
rrr�
force_flattenws





zStructOrUnion.force_flattencCs$t�||||�}|s |�||�|Sr()r�r1�finish_backend_type)rr-r.r/r0rrrr1�s
�zStructOrUnion.get_cached_btypecs$|jr$|jdkr td|jf��dS�j|}d|_|jdkrB�n�|jdkr���fdd�|jD�}tt|j||j	��}d}|j
r�|j
dkr�d}n
d|j
f}�jj|||d	d	f|���nbg}|j\}}}	}
t
t|j��D�]}||}|j|}
t|
t��r�|
jd
k�r�|
j����}t|��|��\}}|dk�rT|�d|j|j|�pLdf�|
�|�}
|jd|�|
f|j|dd�|_|
����}t|
t��r�|
jdk�r�n8��|�}||k�r�|�d
|j|j|�p�d||f�|�|�q�tt|j||j	|��}�j�||||	|
�d|_dS)Nrz(recursive structure declaration for '%s'rcsg|]}|�����qSr)r1)r4rv�r-r.rrr6�s�z5StructOrUnion.finish_backend_type.<locals>.<listcomp>r)�rr�rlzfield '%s.%s' has a bogus size?z{}z=field '%s.%s' is declared as %d bytes, but is really %d bytes)�	completedrer5r)r��fixedlayout�listr�r�r��packedrtZcomplete_struct_or_union�ranger�r�r}rr~r1�divmod�sizeof�_verification_errorr�rm)rr-r.r0r�Zlst�extra_flagsZfieldofsZ	fieldsizeZ	totalsizeZtotalalignmentrSZfsizeZftypeZ	BItemTypeZnlenZnrestZ
BFieldTypeZ	bitemsizerr�rr��s�
�


�

��


��
�

����z!StructOrUnion.finish_backend_typecCst|��dSr()r)r�msgrrrr��sz!StructOrUnion._verification_errorcCs |jr|jdkrt|����dSr()�partialr�rrr#rrr�check_not_partial�szStructOrUnion.check_not_partialcCs.|��|�|�t||d|j|��|d�S)Nznew_%s_type��key)r�rmrKr�r�rLrrrr+�s
�z StructOrUnion.build_backend_type)N)T)F)r9r:r;r�r�r�r�rIr�r�r�r1r�r�r�r+rrrrr�Us


?r�c@seZdZdZdS)�
StructType�structN�r9r:r;r�rrrrr��sr�c@seZdZdZdS)�	UnionType�unionNr�rrrrr��sr�c@sBeZdZdZdZdZddd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dS)�EnumType�enumFNcCs$||_||_||_||_|��dSr()r5�enumerators�
enumvalues�baseinttyper�)rr5r�r�r�rrrrI�s
zEnumType.__init__cCs4t�||�|jdkr0|��}d|�dd�|_dS)Nrr�_)r�r�r�r�r)rr�r5rrrr��s
zEnumType.force_the_namecCs|jr|jst|����dSr()r��partial_resolvedrrr#rrrr��szEnumType.check_not_partialc
Cs4|��|�||�}t||d|��|j|j||d�S)NZ
new_enum_typer�)r��build_baseinttyperKr�r�r�)rr-r.Z
base_btyperrrr+�s�zEnumType.build_backend_typec
CsJ|jdk	r|j�||�S|jr4t|j�}t|j�}nDddl}zt��Wntk
r\YnX|�	d|�
��d}}|dkr�d}td�}td�}nd}td�}td�}|�||�}	|�||�}
|�|	�}|�|
�}|dd	|d>k�r|dd	||>k�r|	S|dd	|d>k�r6|dd	||>k�r6|
St
d
|�
���dS)NrzU%r has no values explicitly defined; guessing that it is equivalent to 'unsigned int'rrWrXrYrZr�r�z=%s values don't all fit into either 'long' or 'unsigned long')r�r1r��min�max�warningsZ__warningregistry__�clear�	NameError�warnrrPr�r)
rr-r.Zsmallest_valueZ
largest_valuer�ZsignZ
candidate1Z
candidate2Zbtype1Zbtype2Zsize1Zsize2rrrr�sH

�


���zEnumType.build_baseinttype)N)r9r:r;r�r�r�rIr�r�r+r�rrrrr��s
r�cCs2|dkrd|}t|ddd�}|�|�d|_|S)Nz$%s�unknown_type)r�r��origin�r5Z
structnamervrrrr�-s
r�cCs(|dkrd|}t|ddd�}t||�S)Nz$$%s)r�r|r�rrr�unknown_ptr_type5sr�c
CsRt|tj�rtSt�4tt|�d�s2t��t|�_	t|�j	W5QR�SQRXdS)N�__typecache)
r�r��
ModuleType�_typecache_cffi_backend�global_lock�hasattrr��weakref�WeakValueDictionaryr�)Zbackendrrr�
get_typecache?sr�c

Os�|�d||f�}z|j|WStk
r0YnXzt|j|�|�}Wn4tk
rz}ztd|||f��W5d}~XYnX|j}t�@|�|�}	|	dkr�|||<|W5QR�S|	W5QR�SW5QRXdS)Nr�z
%s: %r: %s)�popZ
_typecacher*r3rtrer��get)
Zsrctyper-�funcnamerh�kwdsr��res�e�cacheZres1rrrrKJs $
rKcCstd|d|�S)N�?rzrJ)r-r0rrr�
pointer_cacheasr�cCs@|jr<t|jd�tkr<d||jdff|jdd�|_dS)Nrz%s: %sr)rhr��str)r�r5rrr�attach_exception_infodsr�)N)N)-r�r��lockr�errorrrrr	rrr�objectrr>rGZ	void_typerNrPrcrfrgrqrrrxZ
voidp_typer{Zconst_voidp_typer|r}Zchar_array_typer�r�r�r�r�r�r�r�r�r�r�rKr�r�rrrr�<module>sN
/
	L	
G



Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 452 B 0644
__init__.cpython-38.pyc File 452 B 0644
api.cpython-38.opt-1.pyc File 33.25 KB 0644
api.cpython-38.pyc File 33.3 KB 0644
backend_ctypes.cpython-38.opt-1.pyc File 38.74 KB 0644
backend_ctypes.cpython-38.pyc File 39.04 KB 0644
cffi_opcode.cpython-38.opt-1.pyc File 4.54 KB 0644
cffi_opcode.cpython-38.pyc File 4.59 KB 0644
commontypes.cpython-38.opt-1.pyc File 1.75 KB 0644
commontypes.cpython-38.pyc File 1.8 KB 0644
cparser.cpython-38.opt-1.pyc File 21.75 KB 0644
cparser.cpython-38.pyc File 21.88 KB 0644
error.cpython-38.opt-1.pyc File 1.41 KB 0644
error.cpython-38.pyc File 1.41 KB 0644
ffiplatform.cpython-38.opt-1.pyc File 3.38 KB 0644
ffiplatform.cpython-38.pyc File 3.38 KB 0644
lock.cpython-38.opt-1.pyc File 346 B 0644
lock.cpython-38.pyc File 346 B 0644
model.cpython-38.opt-1.pyc File 18.94 KB 0644
model.cpython-38.pyc File 19.11 KB 0644
pkgconfig.cpython-38.opt-1.pyc File 5 KB 0644
pkgconfig.cpython-38.pyc File 5 KB 0644
recompiler.cpython-38.opt-1.pyc File 44.86 KB 0644
recompiler.cpython-38.pyc File 45.34 KB 0644
setuptools_ext.cpython-38.opt-1.pyc File 6.94 KB 0644
setuptools_ext.cpython-38.pyc File 6.97 KB 0644
vengine_cpy.cpython-38.opt-1.pyc File 34.38 KB 0644
vengine_cpy.cpython-38.pyc File 34.63 KB 0644
vengine_gen.cpython-38.opt-1.pyc File 20.21 KB 0644
vengine_gen.cpython-38.pyc File 20.5 KB 0644
verifier.cpython-38.opt-1.pyc File 8.93 KB 0644
verifier.cpython-38.pyc File 8.96 KB 0644