a
    còfõ
  ã                   @   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yN   Y n0 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y¼   t ||¡}t|tƒs:|d }}nZ|tjjv rXt |¡d }}n<|dkrpt	d|f ƒ‚n$||kr†t	d|f ƒ‚|  
|¡\}}t|tjƒs¤J ‚||ft |< ||f Y S 0 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)ÚparserZ
commontypeZcdeclÚresultZquals© r   úM/home/httpd/docs/test/DocsMgr/lib/python3.9/site-packages/cffi/commontypes.pyÚresolve_common_type   s,    

ÿýÿr   c                   C   sN   t  dg d¢t  d¡t  d¡t  t  d¡¡gg d¢¡ddddddddddd	œS )
NZ_UNICODE_STRING)ZLengthZMaximumLengthZBufferzunsigned shortZwchar_t)éÿÿÿÿr   r   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   Ú_typeÚendswithr	   r   r   ÚplatformÚupdater   r   r   r   Ú<module>   s*   


