Your IP : 3.17.165.235


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/cffi/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/cffi/__pycache__/vengine_gen.cpython-311.pyc

�

S�Dg<h��V�ddlZddlZddlZddlmZddlmZGd�de��ZdZ	dS)�N�)�model��VerificationErrorc�8�eZdZdZdZd�Zd�Zd�Zd�Zd1d�Z	d	�Z
d2d�Zd�Zd
�Z
d�Zd�Zd�ZeZeZeZd�ZeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#		d3d"�Z$d#�Z%eZ&d4d$�Z'd%�Z(d&�Z)d'�Z*d(�Z+d5d*�Z,d5d+�Z-d,�Z.d-�Z/eZ0d.�Z1d/�Z2eZ3d0�Z4d S)6�VGenericEngine�gFc�H�||_|j|_g|_i|_dS�N)�verifier�ffi�export_symbols�_struct_pending_verification)�selfrs  �r/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/cffi/vengine_gen.py�__init__zVGenericEngine.__init__s(�� ��
��<��� ���,.��)�)�)�c�<�|�d|j��dS)Nr)�
setdefaultr)r�kwdss  r�patch_extension_kwdsz#VGenericEngine.patch_extension_kwdss"��	
���(�$�*=�>�>�>�>�>rc���|D]_}||z}|�tj}|D]G}tj�||��}tj�|��r|ccS�H�`dSr)�sys�path�os�join�isfile)r�module_namer�so_suffixes�	so_suffix�basename�dirname�filenames        r�find_modulezVGenericEngine.find_modules���$�	$�	$�I�"�Y�.�H��|��x���
$�
$���7�<�<���:�:���7�>�>�(�+�+�$�#�O�O�O�O�O�$�
$�		$�	$rc��dSr�)rs r�
collect_typeszVGenericEngine.collect_types%����r�c�@�|j�|dz��dS)N�
)�_f�write)r�whats  r�_prntzVGenericEngine._prnt(s ����
�
�d�T�k�"�"�"�"�"rc�*�|j}|t��||jj��|�d��t
jdkrAt
jdkrd}nd}|j���}|d|�|�d���dSdS)N�decl�win32���PyInit_�initzvoid z(void) { }
)	r/�cffimod_headerr�preamble�	_generater�platform�version_info�get_module_name)r�prnt�prefix�modnames    r�write_source_to_fz VGenericEngine.write_source_to_f+s����z����^������T�]�
#�$�$�$�	
���v����
�<�7�"�"���4�'�'�"������m�3�3�5�5�G��D�D�F�F�G�G�G�<�=�=�=�=�=�
#�"rrc�b�����jj}tj�tj�jj��}|�||�����	�d��G���fd�dtj����d��}��	�d|���|S)N�loadingc�0��eZdZ�Z�jZgZ�fd�ZdS)�/VGenericEngine.load_library.<locals>.FFILibraryc����jSr)�	_cffi_dir)r�
FFILibrarys �r�__dir__z7VGenericEngine.load_library.<locals>.FFILibrary.__dir__Ts���!�+�+rN)�__name__�
__module__�__qualname__�_cffi_generic_moduler
�	_cffi_ffirFrH)rG�modulers���rrGrDPs@�������#)� ���I��I�
,�
,�
,�
,�
,�
,�
,rrGr)�loaded)�library)r
�_backendrrr�curdirr�modulefilename�load_library�_load�types�
ModuleType)r�flags�backendr#rPrGrNs`    @@rrTzVGenericEngine.load_libraryAs�������(�#���7�<�<��	�4�=�+G�H�H���%�%�h��6�6��	
�
�
�6�9�%�%�%�	,�	,�	,�	,�	,�	,�	,�	,�	,��)�	,�	,�	,��*�R�.�.��	
�
�
�6�8�W�
�5�5�5��rc��d�|jjj���D��}|���|S)Nc�"�g|]\}\}}||f��
Sr&r&)�.0�key�tp�quals    r�
<listcomp>z4VGenericEngine._get_declarations.<locals>.<listcomp>^s7��H�H�H�.�c�:�B���R�y�H�H�Hr)r
�_parser�
_declarations�items�sort)r�lsts  r�_get_declarationsz VGenericEngine._get_declarations]sK��H�H� $�� 0� >� D� D� F� F�H�H�H�����
�
�
��
rc�F�|���D]�\}}|�dd��\}}	t|d|�d|����}n #t$rt	d|z���wxYw	|||���d#t
$r}t
j||���d}~wwxYwdS)N� r�_generate_gen_�_znot implemented in verify(): %r)rf�split�getattr�AttributeErrorr�	Exceptionr�attach_exception_info)r�	step_name�namer^�kind�realname�method�es        rr9zVGenericEngine._generatecs����.�.�0�0�	�	�H�D�"�!�Z�Z��Q�/�/�N�D�(�
>� ������@I�	�(K�L�L����!�
>�
>�
>�'�5��<�>�>�>�
>����
���r�8�$�$�$�$���
�
�
��+�A�t�4�4�4������
����	�	s#�A�A(�,A9�9
B�B�Bc��|���D]h\}}|�dd��\}}t|d|�d|����}	||||fi|���A#t$r}	t	j|	|���d}	~	wwxYwdS)Nrhrrj�_gen_)rfrkrlrnrro)
rrNrprrqr^rrrsrtrus
          rrUzVGenericEngine._loadrs����.�.�0�0�	�	�H�D�"�!�Z�Z��Q�/�/�N�D�(��T�T�9�9�9�d�d�#C�D�D�F�
���r�8�V�4�4�t�4�4�4�4���
�
�
��+�A�t�4�4�4������
����	�	s�
A�
A;� A6�6A;c��dSrr&�rr^rqs   r�_generate_nothingz VGenericEngine._generate_nothing|r(rc��dSrr&�rr^rqrNrs     r�_loaded_noopzVGenericEngine._loaded_noopr(rc	�d��t|tj��sJ�|jr|�d||��dS|j}t
|j��}g}t|j��D]=\}}d}t|tj	��rd}|�
d||fz���>d|z��fd�t|j|��D��}	|j}
t|
tj	��r6|	�
d|
�d�����tj}
d	�|	��pd
}	d|z}|j�
|��|jr|jdz}nd}d|�|�d
|	�d�}
d|z�||
�|
�����|d��t|jtj	��rd}n$t|jtj��sd}nd}|d|�|�d
d	�|���d���|d��|��dS)NFr)�*z%sx%dzargument of %sc�H��g|]\}}|�d|z�����S)z %s)�
get_c_name)r\�type�arg�contexts   �rr`z>VGenericEngine._generate_gen_function_decl.<locals>.<listcomp>�s?���<�<�<� �t�S��?�?�5�3�;��8�8�<�<�<rrz *r�, �void�
_cffi_f_%srh�(�)zresult of %s�{z*r = zreturn �  �);�})�
isinstancer�FunctionPtrType�ellipsis�_generate_gen_constr/�len�args�	enumerate�
StructOrUnion�append�zip�result�insertr��	void_typerr�abi�VoidType)rr^rqr=�numargs�argnames�ir��indirection�arglist�tpresult�wrappernamer��funcdecl�result_coder�s               @r�_generate_gen_function_declz*VGenericEngine._generate_gen_function_decl�sl����"�e�3�4�4�4�4�4�
�;�	�
�$�$�U�D�"�5�5�5��F��z���b�g�,�,���� ���)�)�	8�	8�G�A�t��K��$�� 3�4�4�
"�!���O�O�G�{�A�&6�6�7�7�7�7�"�T�)��<�<�<�<�$'����$:�$:�<�<�<���9���h�� 3�4�4�	'��N�N�1�h�1�1�%��A�A�B�B�B���H��)�)�G�$�$�.���"�T�)����"�"�;�/�/�/�
�6�	��&�3�,�C�C��C��"%�#�{�{�{�G�G�G�<�� �4�'����X�
 �
 ��7�
3�
3�4�4�4���S�	�	�	��b�i��!4�5�5�	�!�K�K��B�I�u�~�6�6�	�#�K�K��K����k�k�4�4�4����8�1D�1D�1D�1D�
E�F�F�F���S�	�	�	�������rc��t|tj��sJ�|jr|�d|||��}�n�g}|}td�|jD����s t|jtj���r9g}t|j��D]_\}	}
t|
tj��r+tj
|
��}
|�|	|
f��|�|
���`|j}t|tj��rz|j�%td|����d����tj
|��}|�d|��|�dd|f��tj}tjt#|��||j��}|j�|��}d|z}
|�||
��}|D]\}	}
|�||	|
|��}�t-|||��t/|��j�|��dS)NFc3�JK�|]}t|tj��V��dSr)r�rr�)r\�typs  r�	<genexpr>z6VGenericEngine._loaded_gen_function.<locals>.<genexpr>�s/����L�L�S�J�s�E�$7�8�8�L�L�L�L�L�Lr�'z'' is used as result type, but is opaquerr�r�)r�rr�r��_load_constant�anyr�r�r�r��PointerTyper��fldtypes�	TypeError�_get_c_namer�r��tupler
�_get_cached_btype�
load_function�_make_struct_wrapper�setattrr�rF)rr^rqrNrP�newfunction�indirections�base_tp�
indirect_argsr�r��indirect_result�BFuncr�s              r�_loaded_gen_functionz#VGenericEngine._loaded_gen_function�sa���"�e�3�4�4�4�4�4�
�;�	A��-�-�e�R��v�F�F�K�K��L��G��L�L�B�G�L�L�L�L�L�
I�!�"�)�U�-@�A�A�
I� "�
�'���0�0�.�.�F�A�s�!�#�u�':�;�;�6�#�/��4�4��$�+�+�Q��H�5�5�5�!�(�(��-�-�-�-�"$�)���o�u�/B�C�C�6�&�/�7�'�i�,;�,G�,G�,I�,I�,I�,I�)L�M�M�M�',�&7��&H�&H�O�!�(�(��O�<�<�<� �'�'��H�o�+F�G�G�G�&+�o�O��*�5��+?�+?�+:�B�K�I�I���H�.�.�r�2�2�E�&��-�K� �.�.�u�k�B�B�K�&�
A�
A���3�"�7�7��Q��8?�A�A������{�+�+�+��W�
�
��&�&�t�,�,�,�,�,rc�������|jj�|j�|����dkr|j����fd�}n����fd�}||_|S)Nr�c�P�������}�|g|�R�|dS�Nr)�new)r��res�BTyper
�oldfuncs  ���r�newfuncz4VGenericEngine._make_struct_wrapper.<locals>.newfunc�s3����g�g�e�n�n�����#�d�#�#�#�#��1�v�
rc�z��|d�����|���fz|�dzd�z}�|�S)Nr)�newp)r�r�rYr�r�s ����rr�z4VGenericEngine._make_struct_wrapper.<locals>.newfunc�sG����B�Q�B�x�7�<�<��t�A�w�#?�#?�"A�A�D��1����J�N���w��~�%r)r
rQr��_cffi_base_type)	rr�r�r^r�r�r�rYr
s	 ``   @@@rr�z#VGenericEngine._make_struct_wrapper�s���������(�#����*�*�2�.�.����=�=��(�C�
�
�
�
�
�
�
�
�

&�
&�
&�
&�
&�
&�
&�
&�#*����rc�N�||jksJ�|�|d|��dS�N�struct�rq�_generate_struct_or_union_declrys   r�_generate_gen_struct_declz(VGenericEngine._generate_gen_struct_decl�s/���r�w������+�+�B��$�?�?�?�?�?rc�6�|�|d||��dSr���_loading_struct_or_union�rr^rqrNs    r�_loading_gen_structz"VGenericEngine._loading_gen_struct�s"���%�%�b�(�D�&�A�A�A�A�Arc�0�|�|��dSr��_loaded_struct_or_unionr|s     r�_loaded_gen_structz!VGenericEngine._loaded_gen_struct�����$�$�R�(�(�(�(�(rc�N�||jksJ�|�|d|��dS�N�unionr�rys   r�_generate_gen_union_declz'VGenericEngine._generate_gen_union_decl�s/���r�w������+�+�B���>�>�>�>�>rc�6�|�|d||��dSr�r�r�s    r�_loading_gen_unionz!VGenericEngine._loading_gen_unions"���%�%�b�'�4��@�@�@�@�@rc�0�|�|��dSrr�r|s     r�_loaded_gen_unionz VGenericEngine._loaded_gen_unionr�rc	���|j�dSd|�d|��}d|�d|��}|�d|�����}|j}|d|�d|�d���|d��|d	��|d
��|���D]�\}}	}
}t	|	t
j��r|	���s|
dkr|d|z���J	|d
|	�dd|z|����d|�d����w#t$r%}|dt|��z��Yd}~��d}~wwxYw|d��|j�|��|d|�d���|d��|d|z��|d��|d|z��|d��|���D]t\}}	}
}|
dkr�|d|�d|�d���t	|	t
j
��r(|	j�!|d|	���z���b|d|�d |�d����u|d!��|d"��|d#��|d$��|d%|�d&���|d��|��dS)'N�_cffi_check_rj�
_cffi_layout_rhzstatic void r�z *p)r�z8  /* only to generate compile-time warnings or errors */z
  (void)p;rz  (void)((p->%s) << 1);z  { z*tmpzfield %r)�qualsz = &p->z; (void)tmp; }z
  /* %s */r�z	intptr_t z(intptr_t i)z,  struct _cffi_aligncheck { char x; %s y; };z  static intptr_t nums[] = {z    sizeof(%s),z)    offsetof(struct _cffi_aligncheck, y),z
    offsetof(r�z),z    0,  /* %s */z
    sizeof(((z *)0)->z    -1z  };z  return nums[i];z3  /* the next line is not executed, but compiled */r�z(0);)�fldnames�stripr/�
enumfieldsr�r�
PrimitiveType�is_integer_typer�r�strrr��	ArrayType�lengthr�)
rr^r>rq�
checkfuncname�layoutfuncname�cnamer=�fname�ftype�fbitsize�fqualrus
             rr�z-VGenericEngine._generate_struct_or_union_declsd��
�;���F��/5�v�v�t�t�<�
�
�17�����>��"�F�F�D�D�)�0�0�2�2���z�����
�
�
�u�u�u�
=�>�>�>���S�	�	�	���
G�H�H�H���\����-/�]�]�_�_�	0�	0�)�E�5�(�E��5�%�"5�6�6�
0��)�)�+�+�
0�08�A�
�
���.��6�7�7�7�7�0��D�D��(�(���E�1A��(�O�O�O�O����� � � � ��)�0�0�0��D���A���.�/�/�/�/�/�/�/�/�����0������S�	�	�	���"�"�>�2�2�2����.�.�.�
:�;�;�;���S�	�	�	���
;�e�
C�D�D�D���
+�,�,�,���
��
&�'�'�'���
8�9�9�9�-/�]�]�_�_�	D�	D�)�E�5�(�E��1�}�}���D�D�E�E�E�5�5�5�9�:�:�:��%���1�1�
D�e�l�6J���'�%�*;�*;�*=�*=�=�>�>�>�>����U�U�U�E�E�E�B�C�C�C�C���X������V������
 �!�!�!���
B�C�C�C����=�=�=�
*�+�+�+���S�	�	�	�������s�+C8�8
D'�D"�"D'c��|j�dSd|�d|��}|j�d��d}|�||��}g}d}		||	��}
|
dkrn|�|
��|	dz
}	�-t|tj��r�|jr�|d}|d}|ddd�}
|ddd�}|�	��t|
��t|��cxkrt|j��ksnJ�|
|||f|_dS|�d	|�����}||f|j
|<dS)
Nr�rjzintptr_t(*)(intptr_t)rTr�r4rh)r�r
�_typeof_lockedr�r�r�rr��partial�
force_flattenr��fixedlayoutr�r)rr^r>rqrNr�r��function�layout�num�x�	totalsize�totalalignment�fieldofs�	fieldsizer�s                rr�z'VGenericEngine._loading_struct_or_union7s���
�;���F��17�����>����'�'�(?�@�@��C���'�'��~�>�>������	����
�
�A��1�u�u�e��M�M�!�����1�H�C�		�
�b�%�-�.�.�	B�2�:�	B��q�	�I�#�A�Y�N��a�d��d�|�H��q�t�!�t��I��������x�=�=�C�	�N�N�F�F�F�F�c�"�+�6F�6F�F�F�F�F�F�F�%�y�)�^�K�B�N�N�N� &�����-�4�4�6�6�E�4:�E�M�D�-�b�1�1�1rc���|j�dS|j�|��||jv�rAd�}|j}|�|��}|j�|��\}}||d|�|��d��||d|�|��d��d}|���D]�\}}	}
}|
dkr�||||�||��d|����||dzdkrA|�|	��}|||dz|�|��d|����|dz
}��|t|��ksJ�dSdS)	Nc�<�||krtd|||fz���dS)Nz'%s (we have %d, but C compiler says %d)r)�	realvalue�
expectedvalue�msgs   r�checkz5VGenericEngine._loaded_struct_or_union.<locals>.checkZs9���
�-�-�+�A��
�y�9�:�;�;�;�.�-rrzwrong total sizerzwrong total alignmentr�zwrong offset for field zwrong size for field )
r�r
r�r�pop�sizeof�alignofr��offsetofr�)
rr^rr
�BStructr�r�r�r�r�r�r��BFields
             rr�z&VGenericEngine._loaded_struct_or_unionSs���
�;���F���"�"�2�&�&�&�
��2�2�2�
;�
;�
;�
�(�C��+�+�B�/�/�G� �=�A�A�"�E�E�M�F�E��E�&��)�S�Z�Z��0�0�2D�E�E�E��E�&��)�S�[�[��1�1�3J�K�K�K��A�13�����	
�	
�-��u�h���q�=�=����f�Q�i����g�u�!=�!=�!=�5:�U�<�>�>�>��!�A�#�;�!�#�#� �2�2�5�9�9�F��E�&��1��+�s�z�z�&�'9�'9�'9�7<�u�>�@�@�@��Q������F���#�#�#�#�/3�2�.$�#rc��t|tj��r|�||d��dS|�|d|��dS�Nr))r�r�EnumType�_generate_gen_enum_declr�rys   r�_generate_gen_anonymous_declz+VGenericEngine._generate_gen_anonymous_declusR���b�%�.�)�)�	>��(�(��T�2�6�6�6�6�6��/�/��B��=�=�=�=�=rc��t|tj��r|�|||d��dS|�|d||��dSr)r�rr�_loading_gen_enumr�r�s    r�_loading_gen_anonymousz%VGenericEngine._loading_gen_anonymous{sW���b�%�.�)�)�	@��"�"�2�t�V�R�8�8�8�8�8��)�)�"�b�$��?�?�?�?�?rc��t|tj��r|j|||fi|��dS|�|��dSr)r�rr�_loaded_gen_enumr�r|s     r�_loaded_gen_anonymousz$VGenericEngine._loaded_gen_anonymous�sU���b�%�.�)�)�	-�!�D�!�"�d�F�;�;�d�;�;�;�;�;��(�(��,�,�,�,�,rN�constc��|j}d|�d|��}|j�|��|�R|sJ�|dksJ�|d|z��|d��|�||��|d��|d��n�|rK|dksJ�|d|z��|d��|d	|�d
���|d|�d���|d��n�|�J�|�J�|d
krd}nd}d}	|dkrt	|t
j��rd}	d}||�d|	�|�d�|����|d��|d|�|�d
���|d��|��dS)N�_cffi_rjr�int %s(char *out_error)r��  return 0;r�zint %s(long long *out_value)z  *out_value = (long long)(r�z
  return (z) <= 0;�var�&r)zconst *rhz(void))r/rr��_check_int_constant_valuer�rr�r�)
r�is_intrqr^�category�check_valuer=�funcname�	ampersand�extras
          rr�z"VGenericEngine._generate_gen_const�s����z���$,�H�H�d�d�3����"�"�8�,�,�,��"��M�M�6��w�&�&�&�&��D�*�X�5�6�6�6��D��I�I�I��*�*�4��=�=�=��D������D��I�I�I�I�
�	��w�&�&�&�&��D�/�(�:�;�;�;��D��I�I�I��D�D�d�d�d�<�=�=�=��D�D�$�$�$�0�1�1�1��D��I�I�I�I��>�>�>��&�&�&��5� � ��	�	��	��E��7�"�"�z�"�e�6I�'J�'J�"�!���	��D�������x�x�x�@�$�G�G�H�H�H��D��I�I�I��D�D�y�y�$�$�$�7�8�8�8��D��I�I�I�������rc��t|tj��o|���}|�|||��dSr)r�rr�r�r�)rr^rqr!s    r�_generate_gen_constant_declz*VGenericEngine._generate_gen_constant_decl�sC���B�� 3�4�4�M��9K�9K�9M�9M��� � ���r�2�2�2�2�2rc�B�d|z}|�|sJ�|�||��|}�ny|r�|j�d��d}|j�d��d}	|�|	|��}
|j�|��}|
|��}t|d��}|dkrE|sC|j�d��d}
|dd|j�|
��zzz
}n�|�J�d}t|tj	��rd	|z}|j�|�
||����d}	|�|	|��}
|
��}t|tj	��r|d}|S)
Nz_cffi_const_%sz
long long*rzint(*)(long long*)z	long longr�z	(*)(void)r)�_load_known_int_constantr
r�r�r��intr	r�rr�r�)rr!r^rqrNr#r$�valuer�r�r��p�negative�	BLongLong�fntypeextras               rr�zVGenericEngine._load_constant�s���#�d�*���"��M�M�6��)�)�&�(�;�;�;��E�E�
�	!��H�+�+�L�9�9�!�<�E��H�+�+�,@�A�A�!�D�E��+�+�E�8�<�<�H�����U�#�#�A��x��{�{�H���!��I�I�E��q�y�y��y� �H�3�3�K�@�@��C�	��!��$�(�/�/�)�"<�"<� <�=�>����&�&�&�%�K��"�e�1�2�2�
0�!�K�/���H�+�+�B�M�M�+�t�,L�,L�M�M�a�P�E��+�+�E�8�<�<�H��H�J�J�E��"�e�1�2�2�
!��a����rc��t|tj��o|���}|�||||��}t|||��t
|��j�|��dSr)	r�rr�r�r�r�r�rFr�)rr^rqrNrPr!r-s       r�_loaded_gen_constantz#VGenericEngine._loaded_gen_constant�ss���B�� 3�4�4�M��9K�9K�9M�9M���#�#�F�B��f�=�=�����u�%�%�%��W�
�
��&�&�t�,�,�,�,�,rc�X�|j}|dkr|d|||fz��n|d|||fz��|d��|d|z��|d|z��|d��|d|z��|d	��|d
|dd�|fz��|d��|d
��dS)Nrz&  if ((%s) > 0 || (long)(%s) != %dL) {z1  if ((%s) <= 0 || (unsigned long)(%s) != %dUL) {z    char buf[64];z    if ((%s) <= 0)z)        sprintf(buf, "%%ld", (long)(%s));z    elsez2        sprintf(buf, "%%lu", (unsigned long)(%s));z:    sprintf(out_error, "%s has the real value %s, not %s",z            "%s", buf, "%d");�dz    return -1;z  })r/)rrqr-r=s    rr z(VGenericEngine._check_int_constant_value�s,���z���A�:�:��D�9��d�E�=#�#�
$�
$�
$�
$�
�D�D��d�E�H#�#�
$�
$�
$���
 �!�!�!���
!�D�
(�)�)�)���
8�4�
?�@�@�@���Z������
A�
��	�	�	���
I�J�J�J���
,��T�c�T�
�E�/B�
B�C�C�C���
������U�����rc��|j�d��d}|j�d��d}|�||��}|j�|d��}||��dkrI|j�|��}t
jdkrt|d��}t|���dS)Nzchar[]rz
int(*)(char*)�r3zutf-8)	r
r�r�r��stringrr;r�r)rrNr$r�r�r�r.�errors        rr+z'VGenericEngine._load_known_int_constant�s�����'�'��1�1�!�4����'�'��8�8��;���'�'��x�8�8���H�L�L���$�$���8�A�;�;��?�?��H�O�O�A�&�&�E���4�'�'��E�7�+�+��#�E�*�*�*�	�?rc�>�|�dd��}d|�d|��S)N�$�___D_�_cffi_e_rj)�replace)rr>rqs   r�_enum_funcnamezVGenericEngine._enum_funcname�s(���|�|�C��)�)���"(�&�&�$�$�/�/r�enumc��|jr"|jD]}|�d|���dS|�||��}|j�|��|j}|d|z��|d��t|j|j��D]\}}|�	||���|d��|d��|��dS)NTrr�rr�)
r��enumeratorsr�r?rr�r/r��
enumvaluesr )rr^rqr>�
enumeratorr$r=�	enumvalues        rrz&VGenericEngine._generate_gen_enum_decl�s���
�:�	� �n�
;�
;�
��(�(��z�:�:�:�:��F��&�&�v�t�4�4����"�"�8�,�,�,��z����
&��
1�2�2�2���S�	�	�	�%(�����%G�%G�	B�	B�!�J�	��*�*�:�y�A�A�A�A���]������S�	�	�	�������rc�������jr2���fd��jD��}t|���_d�_dS��||��}���|��dS)Nc�@��g|]}��d�|�����S)T)r�)r\rDrNrr^s  ���rr`z4VGenericEngine._loading_gen_enum.<locals>.<listcomp>s=���<�<�<�(��-�-�d�B�
�F�K�K�<�<�<rT)r�rBr�rC�partial_resolvedr?r+)rr^rqrNr>rCr$s`` `   rrz VGenericEngine._loading_gen_enums������
�:�	<�<�<�<�<�<�<�,.�N�<�<�<�J�!�*�-�-�B�M�"&�B�����*�*�6�4�8�8�H��)�)�&�(�;�;�;�;�;rc��t|j|j��D]=\}}t|||��t	|��j�|���>dSr)r�rBrCr�r�rFr�)rr^rqrNrPrDrEs       rrzVGenericEngine._loaded_gen_enums`��%(�����%G�%G�	7�	7�!�J�	��G�Z��3�3�3���M�M�#�*�*�:�6�6�6�6�	7�	7rc�L�|dkrd}n|}|�d||���dS�Nz...T)r#)r�)rr^rqr#s    r�_generate_gen_macro_declz'VGenericEngine._generate_gen_macro_decl s8��
��;�;��K�K��K�� � ��t�� �E�E�E�E�Erc��|dkrd}n|}|�d||||���}t|||��t|��j�|��dSrK)r�r�r�rFr�)rr^rqrNrPr#r-s       r�_loaded_gen_macroz VGenericEngine._loaded_gen_macro)sq��
��;�;��K�K��K��#�#�D�"�d�F�0;�$�=�=�����u�%�%�%��W�
�
��&�&�t�,�,�,�,�,rc���t|tj��r�|���rY|j}d|��}|j�|��|d|z��|d��|d|�d���|d��tj|j��}|�	d||��dStj|��}|�	d||d�	��dS)
N�
_cffi_sizeof_zsize_t %s(void)r�z  return sizeof(r�r�Fr)r")
r�rr��length_is_unknownr/rr�r��itemr�)rr^rqr=r$�tp_ptrs      r�_generate_gen_variable_declz*VGenericEngine._generate_gen_variable_decl6s���b�%�/�*�*�
	J��#�#�%�%�
��z���04��6���#�*�*�8�4�4�4���&��1�2�2�2���S�	�	�	����t�t�t�5�6�6�6���S�	�	�	��&�r�w�/�/�F��$�$�U�D�&�9�9�9�9�9��&�r�*�*�F��$�$�U�D�&�5�$�I�I�I�I�Irc���t|tj���r|���r�d|��}|j�d��d}|�||��}|��}|j�|j��}	t||j�
|	����\}
}|dkrtd|�d|j�����|�|
��}tj
|j��}|�d|||��}
|j�5|j�|��}|j�||
��}
t#|||
��t%|��j�|��dSd|z}|j�|�d|����d}|�||��}|����fd	�}�fd
�}t#t%|��|t-||����t%|��j�|��dS)NrPzsize_t(*)(void)rz
bad size: z! does not seem to be an array of Fz_cffi_var_%sz
*(*)(void)c����dSr�r&)rP�ptrs �r�getterz3VGenericEngine._loaded_gen_variable.<locals>.gettergs����q�6�Mrc���|�d<dSr�r&)rPr-rWs  �r�setterz3VGenericEngine._loaded_gen_variable.<locals>.setteris����C��F�F�Fr)r�rr�rQr
r�r�r�rR�divmodr	r�resolve_lengthr�r�r��castr�r�rFr�r��property)rr^rqrNrPr$r�r��size�	BItemTyper��restrSr-�BArrayrXrZrWs                 @r�_loaded_gen_variablez#VGenericEngine._loaded_gen_variableHsP����b�%�/�*�*�	��#�#�%�%�
/�
/�04��6����/�/�0A�B�B�1�E��!�/�/��x�@�@���x�z�z�� �H�6�6�r�w�?�?�	�%�d�D�H�O�O�I�,F�,F�G�G�����1�9�9�+�+����r�w�w�(�)�)�)��&�&�v�.�.���&�r�w�/�/�F��'�'��v�t�V�D�D�E��y�$���3�3�B�7�7����
�
�f�e�4�4���G�T�5�)�)�)���M�M�#�*�*�4�0�0�0��F�"�D�(����'�'��
�
�l�D�(I�(I�J�J�1�M���'�'��x�8�8���h�j�j��	�	�	�	�	�	�	�	�	�	���W�
�
�t�X�f�f�%=�%=�>�>�>��W�
�
��&�&�t�,�,�,�,�,r)r))r)NrNr)r@)5rIrJrK�
_class_key�_gen_python_modulerrr$r'r/r@rTrfr9rUrzr}�_generate_gen_typedef_decl�_loading_gen_typedef�_loaded_gen_typedefr��_loading_gen_functionr�r�r�r�r�r�r�r�r�r�r�rrrr�r(�_loading_gen_constantr�r3r r+r?rrrrL�_loading_gen_macrorNrT�_loading_gen_variablercr&rrrrs��������J���/�/�/�?�?�?�$�$�$�
�
�
�#�#�#�#�>�>�>�,����8���
�
�
����
�
�
�
�
�
�$5��#/��#/��
+�+�+�Z)��"-�"-�"-�H���&@�@�@�B�B�B�)�)�)�?�?�?�A�A�A�)�)�)�/�/�/�bB�B�B�8$�$�$�D>�>�>�@�@�@�-�-�-�CJ�(,�#�#�#�#�J3�3�3�)������8-�-�-����&	+�	+�	+�0�0�0�
����"<�<�<�<�7�7�7�F�F�F�&��-�-�-�J�J�J� )��$-�$-�$-�$-�$-rrad
#include <stdio.h>
#include <stddef.h>
#include <stdarg.h>
#include <errno.h>
#include <sys/types.h>   /* XXX for ssize_t on some platforms */

/* this block of #ifs should be kept exactly identical between
   c/_cffi_backend.c, cffi/vengine_cpy.py, cffi/vengine_gen.py
   and cffi/_cffi_include.h */
#if defined(_MSC_VER)
# include <malloc.h>   /* for alloca() */
# if _MSC_VER < 1600   /* MSVC < 2010 */
   typedef __int8 int8_t;
   typedef __int16 int16_t;
   typedef __int32 int32_t;
   typedef __int64 int64_t;
   typedef unsigned __int8 uint8_t;
   typedef unsigned __int16 uint16_t;
   typedef unsigned __int32 uint32_t;
   typedef unsigned __int64 uint64_t;
   typedef __int8 int_least8_t;
   typedef __int16 int_least16_t;
   typedef __int32 int_least32_t;
   typedef __int64 int_least64_t;
   typedef unsigned __int8 uint_least8_t;
   typedef unsigned __int16 uint_least16_t;
   typedef unsigned __int32 uint_least32_t;
   typedef unsigned __int64 uint_least64_t;
   typedef __int8 int_fast8_t;
   typedef __int16 int_fast16_t;
   typedef __int32 int_fast32_t;
   typedef __int64 int_fast64_t;
   typedef unsigned __int8 uint_fast8_t;
   typedef unsigned __int16 uint_fast16_t;
   typedef unsigned __int32 uint_fast32_t;
   typedef unsigned __int64 uint_fast64_t;
   typedef __int64 intmax_t;
   typedef unsigned __int64 uintmax_t;
# else
#  include <stdint.h>
# endif
# if _MSC_VER < 1800   /* MSVC < 2013 */
#  ifndef __cplusplus
    typedef unsigned char _Bool;
#  endif
# endif
#else
# include <stdint.h>
# if (defined (__SVR4) && defined (__sun)) || defined(_AIX) || defined(__hpux)
#  include <alloca.h>
# endif
#endif
)
rrrVr)rr9r�objectrr7r&rr�<module>rns���������������������$�$�$�$�$�$�a	-�a	-�a	-�a	-�a	-�V�a	-�a	-�a	-�F5���r

?>