Current File : //usr/lib64/python2.7/site-packages/cffi/model.pyo
�
9�Wc@sZddlZddlZddlZddlmZdZdZdZd�Zde	fd��YZ
d	e
fd
��YZdefd��YZe�Z
d
efd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZee
�Zd�Zee
�Zdefd��YZd efd!��YZeed"�d�Zd#e
fd$��YZd%efd&��YZd'efd(��YZd)efd*��YZ d+efd,��YZ!dd-�Z"dd.�Z#e�Z$d/�Z%d0�Z&d1�Z'dS(2i����Ni(t
allocate_lockiicCs[|t@rd|j�}n|t@r:d|j�}n|t@rWd|j�}n|S(Ns const s
 volatile s __restrict (tQ_CONSTtlstript
Q_VOLATILEt
Q_RESTRICT(tqualstreplace_with((s0/usr/lib64/python2.7/site-packages/cffi/model.pytqualifys


tBaseTypeByIdentitycBs_eZeZeZdddd�Zd�Zd�Zd�Zed�Z	d�Z
d	�ZRS(
tsa C fileicCs�|j}|j�}|rc|jd�rCd|krCd|}qc|ddkrcd|}qcnt||�}|jd|�}d|kr�d	d
lm}|d|j�|f��n|S(Nt*s&[s(%s)is[(t t&t$i(tVerificationErrors-cannot generate '%s' in %s: unknown type name(tc_name_with_markertstript
startswithRtreplacetffiplatformRt_get_c_name(tselfRtcontextRtresultR((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt
get_c_names	
cCs|jjdd�S(NRR	(RR(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR0scCsd|j�kS(NR
(R(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt
has_c_name3scCstS(N(tFalse(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pytis_integer_type6scCsPy|j|}Wn8tk
rK|j||�}|jj||�}nX|S(N(t_cached_btypestKeyErrortbuild_backend_typet
setdefault(Rtffit
finishlistt	can_delaytBTypetBType2((s0/usr/lib64/python2.7/site-packages/cffi/model.pytget_cached_btype9s
cCsd|j�fS(Ns<%s>(R(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt__repr__BscCs)g|jD]}|t||�f^q
S(N(t_attrs_tgetattr(Rtname((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt
_get_itemsEs(t__name__t
__module__Rt
is_array_typetis_raw_functionRRRRR%R&R*(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyRs					tBaseTypecBs#eZd�Zd�Zd�ZRS(cCs(|j|jko'|j�|j�kS(N(t	__class__R*(Rtother((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt__eq__KscCs||kS(N((RR1((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt__ne__OscCst|jt|j��f�S(N(thashR0ttupleR*(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt__hash__Rs(R+R,R2R3R6(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR/Is		tVoidTypecBs eZdZd�Zd�ZRS(cCs
d|_dS(Nsvoid&(R(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt__init__YscCst||d�S(Nt
new_void_type(tglobal_cache(RR R!((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR\s((R+R,R'R8R(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR7Vs	tBasePrimitiveTypecBseZRS((R+R,(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR;bst
PrimitiveTypecBs�eZd8Zi/dd6dd6dd6dd6dd6dd6dd	6dd
6dd6dd6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6dd"6dd#6dd$6dd%6dd&6dd'6dd(6dd)6dd*6dd+6dd,6dd-6dd.6dd/6dd06dd16dd26Zd3�Zd4�Zd5�Zd6�Zd7�ZRS(9R)tctchartitshorttinttlongs	long longssigned chars
unsigned charsunsigned shortsunsigned ints
unsigned longsunsigned long longtftfloattdoubleslong doublet_Booltwchar_ttint8_ttuint8_ttint16_ttuint16_ttint32_ttuint32_ttint64_ttuint64_ttint_least8_tt
uint_least8_tt
int_least16_ttuint_least16_tt
int_least32_ttuint_least32_tt
int_least64_ttuint_least64_ttint_fast8_ttuint_fast8_ttint_fast16_tt
uint_fast16_ttint_fast32_tt
uint_fast32_ttint_fast64_tt
uint_fast64_ttintptr_tt	uintptr_ttintmax_tt	uintmax_tt	ptrdiff_ttsize_ttssize_tcCs||_|d|_dS(NR(R)R(RR)((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8�s	cCs|j|jdkS(NR=(tALL_PRIMITIVE_TYPESR)(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pytis_char_type�scCs|j|jdkS(NR?(RgR)(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�scCs|j|jdkS(NRC(RgR)(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt
is_float_type�scCst||d|j�S(Ntnew_primitive_type(R:R)(RR R!((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s(sname(	R+R,R'RgR8RhRRiR(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR<fsl
				tUnknownIntegerTypecBs)eZdZd�Zd�Zd�ZRS(R)cCs||_|d|_dS(NR(R)R(RR)((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8�s	cCstS(N(tTrue(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�scCstd|j��dS(Ns4integer type '%s' can only be used after compilation(tNotImplementedErrorR)(RR R!((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s(sname(R+R,R'R8RR(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyRk�s		tUnknownFloatTypecBs eZdZd�Zd�ZRS(R)cCs||_|d|_dS(NR(R)R(RR)((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8�s	cCstd|j��dS(Ns2float type '%s' can only be used after compilation(RmR)(RR R!((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s(sname(R+R,R'R8R(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyRn�s	tBaseFunctionTypecBseZdZdd�ZRS(targsRtellipsistabicCs�||_||_||_||_g|jD]}|j�^q.}|jr_|jd�n|pkdg}|jdj|�f}|dk	r�|d |d|d}n|jj	j
d|�|_	dS(Ns...tvoids, iRR(RpRRqRrRtappendt
_base_patterntjointNoneRR(RRpRRqRrtargtreprargsR((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8�s				"	(sargssresultsellipsissabiN(R+R,R'RwR8(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyRo�stRawFunctionTypecBs&eZdZeZd�Zd�ZRS(s(&)(%s)cCs*ddlm}|jd|f��dS(Ni(tapisPcannot render the type %r: it is a function type, not a pointer-to-function type(R	R{t	CDefError(RR R!R{((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s	cCst|j|j|j|j�S(N(tFunctionPtrTypeRpRRqRr(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pytas_function_pointer�s(R+R,RuRlR.RR~(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyRz�s	R}cBs eZdZd�Zd�ZRS(s(*&)(%s)cCs�|jj||�}g}x*|jD]}|j|j||��q%Wd}|jdkr�|js�y|jjf}Wq�tk
r�q�Xq�nt	||dt
|�||j|�S(Nt	__stdcalltnew_function_type((RR%RpRtRrRqt_backendtFFI_STDCALLtAttributeErrorR:R5(RR R!RRpttptabi_args((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s	

cCst|j|j|j|j�S(N(RzRpRRqRr(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pytas_raw_function�s(R+R,RuRR�(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR}�s	tPointerTypecBs#eZdZdd�Zd�ZRS(ttotypeRicCs\||_||_t|d�}|jr@d|j�f}n|jjd|�|_dS(Ns *&s(%s)R(R�RRR-RRR(RR�Rtextra((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8s			cCs.|jj||dt�}t||d|�S(NR"tnew_pointer_type(R�R%RlR:(RR R!tBItem((s0/usr/lib64/python2.7/site-packages/cffi/model.pyRs(stotypesquals(R+R,R'R8R(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�scCs
t|t�S(N(R�R(R�((s0/usr/lib64/python2.7/site-packages/cffi/model.pytConstPointerTypestNamedPointerTypecBseZdZdd�ZRS(R�R)icCs-tj|||�||_|d|_dS(NR(R�R8R)R(RR�R)R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8s	(stotypesname(R+R,R'R8(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�st	ArrayTypecBs/eZdZeZd�Zd�Zd�ZRS(titemtlengthcCse||_||_|dkr'd}n|dkr<d}n
d|}|jjjd|�|_dS(Ns&[]s...s
&[/*...*/]s&[%s]R(R�R�RwRR(RR�R�tbrackets((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8$s				
cCst|j|�S(N(R�R�(Rt	newlength((s0/usr/lib64/python2.7/site-packages/cffi/model.pytresolve_length1scCs|jdkr8ddlm}|jd|f��n|jj||�t|j�j||�}t||d||j�S(Ns...i(R{s)cannot render the type %r: unknown lengthtnew_array_type(R�R	R{R|R�R%R�R:(RR R!R{tBPtrItem((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR4s	(sitemslength(R+R,R'RlR-R8R�R(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR� s
	
	R>tStructOrUnionOrEnumcBs/eZdZdZd�Zd�Zd�ZRS(R)cCs0|jpd|j|jf}|d|_dS(Ns%s %sR(t	forcenametkindR)R(RR)((s0/usr/lib64/python2.7/site-packages/cffi/model.pytbuild_c_name_with_markerDscCs||_|j�dS(N(R�R�(RR�((s0/usr/lib64/python2.7/site-packages/cffi/model.pytforce_the_nameHs	cCs|jd S(Ni����(R(R((s0/usr/lib64/python2.7/site-packages/cffi/model.pytget_official_nameLs(snameN(R+R,R'RwR�R�R�R�(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�@s
		t
StructOrUnioncBsweZd
ZdZeZeZd
d�Zd�Z	d�Z
d�Zed�Zd�Z
d�Zd�Zd	�ZRS(icCs;||_||_||_||_||_|j�dS(N(R)tfldnamestfldtypest
fldbitsizetfldqualsR�(RR)R�R�R�R�((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8Ws					cCs\|jdkrtSxBt|j|j�D]+\}}|dkr)t|t�r)tSq)WtS(NR	(R�RwRtzipR�t
isinstanceR�Rl(RR)ttype((s0/usr/lib64/python2.7/site-packages/cffi/model.pythas_anonymous_struct_fields_s"ccs�|j}|dkr+dt|j�}nx}t|j|j|j|�D]]\}}}}|dkr�t|t�r�x-|j	�D]}|Vq�WqJ||||fVqJWdS(NiR	(i(
R�RwtlenR�R�R�R�R�R�t
enumfields(RR�R)R�tbitsizeRR((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�gs	c	Cs�g}g}g}g}xT|j�D]F\}}}}|j|�|j|�|j|�|j|�q%Wt|�|_t|�|_t|�|_t|�|_dS(N(R�RtR5R�R�R�R�(	RtnamesttypestbitsizesR�R)R�R�R((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt
force_flattents


cCs5tj||||�}|s1|j||�n|S(N(R�R%tfinish_backend_type(RR R!R"R#((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR%�s
	cCs�|jr5|jdkr1td|jf��ndS|j|}d|_|jdkr]nh|jdkr�g|jD]}|j||�^qv}tt	|j
||j��}d}|jr�d}n|j
j|||dd|�n�g}|j\}}	}
}x~tt|j
��D]g}|	|}
|j|}t|t�r�|jdkr�|jj||�}t|
|j|��\}}|dkr�|jd|j|j
|p�d	f�n|j|�}|j| |f|j|d|_n|j||�}t|t�r,|jdkr,nK|j|�}||
krw|jd
|j|j
|pfd	||
f�n|j|�qWtt	|j
||j|��}|j
j||||
|�d|_dS(Nis(recursive structure declaration for '%s'iiii����s...sfield '%s.%s' has a bogus size?s{}s=field '%s.%s' is declared as %d bytes, but is really %d bytes(t	completedRmR)RR�RwtfixedlayoutR%tlistR�R�R�tpackedR�tcomplete_struct_or_uniontrangeR�R�R�R�R�tdivmodtsizeoft_verification_errorR�Rt(RR R!R#R�R�tlsttsflagstfieldofst	fieldsizet	totalsizettotalalignmentR?tfsizetftypet	BItemTypetnlentnrestt
BFieldTypet	bitemsize((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR��s`	
	%		

!!
cCs ddlm}||��dS(Ni(R(RR(RtmsgR((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR��scCsD|jr@|jdkr@ddlm}|j|j���ndS(Ni(R(tpartialR�RwR	RtVerificationMissingR(RR((s0/usr/lib64/python2.7/site-packages/cffi/model.pytcheck_not_partial�scCs=|j�|j|�t||d|j|j�d|�S(Nsnew_%s_typetkey(R�RtR:R�R�(RR R!((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s

N(R+R,RwR�R�RR�R�R8R�R�R�R%R�R�R�R(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�Qs		
		<		t
StructTypecBseZdZRS(tstruct(R+R,R�(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR��st	UnionTypecBseZdZRS(tunion(R+R,R�(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR��stEnumTypecBsJeZdZeZeZdd�Zd�Zd�Z	d�Z
d�ZRS(tenumcCs2||_||_||_||_|j�dS(N(R)tenumeratorst
enumvaluestbaseinttypeR�(RR)R�R�R�((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR8�s
				cCsKtj||�|jdkrG|j�}d|jdd�|_ndS(NR
Rt_(R�R�R�RwR�R(RR�R)((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR��scCs?|jr;|jr;ddlm}|j|j���ndS(Ni(R(R�tpartial_resolvedR	RR�R(RR((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR��sc
CsJ|j�|j||�}t||d|j�|j|j|d|�S(Nt
new_enum_typeR�(R�tbuild_baseinttypeR:R�R�R�(RR R!t
base_btype((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s
	cCs�|jdk	r"|jj||�Sddlm}|jr\t|j�}t|j�}n-ddl}|j	d|j
��d}}|dkr�d}td�}td�}	nd}td�}td	�}	|j||�}
|	j||�}|j|
�}|j|�}
|dd
|d>krJ|dd
||>krJ|
S|dd
|
d>kr~|dd
|
|>kr~|S|j
d|j
���dS(Ni(R{i����s�%r has no values explicitly defined; next version will refuse to guess which integer type it is meant to be (unsigned/signed, int/long)iRARBsunsigned ints
unsigned longis=%s values don't all fit into either 'long' or 'unsigned long'(R�RwR%R	R{R�tmintmaxtwarningstwarnRR<R�R|(RR R!R{tsmallest_valuet
largest_valueR�tsignt
candidate1t
candidate2tbtype1tbtype2tsize1tsize2((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�s:		
	N(R+R,R�RR�R�RwR8R�R�RR�(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR��s			cCsH|dkrd|}nt|ddd�}|j|�d|_|S(Ns$%stunknown_type(RwR�R�torigin(R)t
structnameR�((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR�%s

	cCs;|dkrd|}nt|ddd�}t||�S(Ns$$%s(RwR�R�(R)R�R�((s0/usr/lib64/python2.7/site-packages/cffi/model.pytunknown_ptr_type-s
c
Os%|jd||f�}y|jj|SWnctk
r=nStk
r�t|jtj�rttj	�|j_q�tj	�t
|j�_nXyt|j|�|�}Wn,tk
r�}td|||f��nX|jj}t
�2|j|�}	|	dkr|||<|S|	SWdQXdS(NR�s
%s: %r: %s(tpopR�t__typecacheRR�R�R�t
ModuleTypetweakreftWeakValueDictionaryR�R(Rmtglobal_locktgetRw(
tsrctypeR tfuncnameRptkwdsR�trestetcachetres1((s0/usr/lib64/python2.7/site-packages/cffi/model.pyR:6s(


cCstd|d|�S(Nt?R�(R:(R R#((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt
pointer_cacheUscCsQ|jrMt|jd�tkrMd||jdff|jd|_ndS(Nis%s: %si(RpR�tstr(R�R)((s0/usr/lib64/python2.7/site-packages/cffi/model.pytattach_exception_infoXs"((R�tsysR�tlockRRRRRtobjectRR/R7t	void_typeR;R<RkRnRoRzR}R�t
voidp_typeR�tconst_voidp_typeR�R�Rwtchar_array_typeR�R�R�R�R�R�R�R�R:R�R�(((s0/usr/lib64/python2.7/site-packages/cffi/model.pyt<module>sF	
0
		F		�C