U
    Ê¹Öhõ
  ã                   @   sÊ   d dl Z ddlmZ ddlmZ i Zzd dlmZ eeƒ W n ek
rP   Y nX e 	dd¡ed< ded	< d
ed< ded< ej
jD ]Ze d¡r‚eee< q‚[i Zdd„ Zdd„ Ze jdkrÆe eƒ ¡ dS )é    Né   )Úmodel)ÚFFIError)Ú_get_common_typesÚFILEZ_IO_FILEZ_BoolÚboolZ_cffi_float_complex_tzfloat _ComplexZ_cffi_double_complex_tzdouble _ComplexZ_tc                 C   sÄ   z
t | W S  tk
r¾   t ||¡}t|tƒs<|d }}nZ|tjjkrZt |¡d }}n<|dkrrt	d|f ƒ‚n$||krˆt	d|f ƒ‚|  
|¡\}}t|tjƒs¦t‚||ft |< ||f Y S X d S )Nr   úset-unicode-neededzFThe Windows type %r is only available after you call ffi.set_unicode()z®Unsupported type: %r.  Please look at http://cffi.readthedocs.io/en/latest/cdef.html#ffi-cdef-limitations and file an issue if you think this type should really be supported.)Ú_CACHEÚKeyErrorÚCOMMON_TYPESÚgetÚ
isinstanceÚstrr   ÚPrimitiveTypeÚALL_PRIMITIVE_TYPESr   Zparse_type_and_qualsZBaseTypeByIdentityÚAssertionError)ÚparserZ
commontypeZcdeclÚresultZquals© r   ú6./venv/lib/python3.8/site-packages/cffi/commontypes.pyÚresolve_common_type   s,    

ÿýÿr   c                   C   sR   t  ddddgt  d¡t  d¡t  t  d¡¡gdddg¡dd	d
d
d
d
d
d
d
d
dœS )NZ_UNICODE_STRINGZLengthZMaximumLengthZBufferzunsigned shortZwchar_téÿÿÿÿzUNICODE_STRING *zconst UNICODE_STRING *r   )ZUNICODE_STRINGZPUNICODE_STRINGZPCUNICODE_STRINGZTBYTEZTCHARZLPCTSTRZPCTSTRZLPTSTRZPTSTRZPTBYTEZPTCHAR)r   Z
StructTyper   ZPointerTyper   r   r   r   Úwin_common_types9   s.    þþø	ìr   Úwin32)ÚsysÚ r   Úerrorr   r   Z_cffi_backendr   ÚImportErrorZunknown_typer   r   Z_typeÚendswithr	   r   r   ÚplatformÚupdater   r   r   r   Ú<module>   s*   


