+
    i+                     >   ^ RI t ^ RIt^ RIt^ RIt^ RIt^RIHt ^RIHt ^RIH	t	 ] P                  R8  d	   ^ RItR tM^ RItR t] P                  R8  d   ]P                  tM ! R R]P"                  4      t ! R	 R
]4      tRtR tRsR tR tRR ltR tR tR# )    N)__version_verifier_modules__)ffiplatform)VerificationErrorc                  D    \         P                  P                  R ,          # ):NNN)	importlib	machineryEXTENSION_SUFFIXES     T/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/cffi/verifier.py_extension_suffixesr      s    ""55a88r   c                      \         P                  ! 4        U UUu. uF  w  rpV\         P                  8X  g   K  V NK!  	  uppp # u uppp i N)impget_suffixesC_EXTENSION)suffix_types      r   r   r      sB    .1.>.>.@ ,.@?6d3??* .@ , 	, ,s
   AAc                   2   a a ] tR t^t oV 3R ltRtVtV ;t# )NativeIOc                |   < \        V\        4      '       d   VP                  R 4      p\        \        V `  V4       R# )asciiN)
isinstanceunicodeencodesuperr   write)selfs	__class__s   &&r   r   NativeIO.write   s-    !W%%HHW%(D'*r   r
   )__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classcell__)r!   __classdict__s   @@r   r   r      s     	+ 	+r   r   c                   z   a  ] tR t^t o RR ltRR ltR tR tR tR t	R t
R	 tR
 tR tRR ltR tR tRtV tR# )VerifierNc                V   VP                   P                  '       d$   \        R VP                   P                  : 24      hWn        W n        V'       g   \
        P                  ! V4      p\        W4      pV! V 4      V n        V P                  P                  V4       Wn
        V P                  W4      V n        V'       d   V'       d   \        R4      hEM*RP                  R\        P                   R,          ,          \"        VX.VP$                  ,           4      p\        P                   R8  d   VP'                  R4      p\)        \*        P,                  ! VR,          4      R,          4      pVP/                  R4      P1                  R	4      p\)        \*        P,                  ! VR
,          4      R,          4      pVP/                  R4      P1                  R	4      pRV: RV P                  P2                  : V: V: 2p\5        4       ^ ,          pT;'       g    \7        4       V n        \:        P<                  P                  V P8                  WH,           4      V n        \:        P<                  P                  V P8                  VV,           4      V n         WPn!        RV n"        RV n#        R# )zIfeature not supported with ffi.verify(), but only with ffi.set_source(): z)can't specify both 'modulename' and 'tag' z%d.%d:N   Nzutf-8:r   Nr/   l    0xL:   Nr/   0_cffi_r   FN   )$_parser_uses_new_featurer   ffipreambler   flatten_locate_engine_class_venginepatch_extension_kwdsflagsmake_relative_tokwds	TypeErrorjoinsysversion_infor   _cdefsourcesr   hexbinasciicrc32lstriprstrip
_class_key_get_so_suffixes_caller_dir_pycachetmpdirospathsourcefilenamemodulefilenameext_package_has_source_has_module)r   r9   r:   rO   
modulenamerT   tagforce_generic_enginesource_extensionr?   relative_torA   flattened_kwdsvengine_classkeyk1k2r   s   &&&&&&&&&&&,      r   __init__Verifier.__init__    s    ;;(((#/2{{/L/LOP P  (006N,SG%d+**40
))$<	 KLL  ++w)9)9")==;'9 "../ 0C 4'jj)X^^CI.;<B4'',BX^^CI.;<B3&&s+B.14==3K3K.0"6J!#A&55 3 5 ggll4;;
8UV ggll4;;
V8KL&  r   c                    V P                   P                  ;_uu_ 4        V P                  '       d   Vf   \        R4      hV P	                  V4       RRR4       R#   + '       g   i     R# ; i)zcWrite the C source code.  It is produced in 'self.sourcefilename',
which can be tweaked beforehand.Nzsource code already written)r9   _lockrU   r   _write_sourcer   files   &&r   write_sourceVerifier.write_sourceI   sK     XX^^^DL'13 3t$	 ^^^s   3AA-	c                   V P                   P                  ;_uu_ 4        V P                  '       d   \        R4      hV P                  '       g   V P                  4        V P                  4        RRR4       R#   + '       g   i     R# ; i)z|Write the C source code (if not done already) and compile it.
This produces a dynamic link library in 'self.modulefilename'.zmodule already compiledN)r9   rd   rV   r   rU   re   _compile_moduler   s   &r   compile_moduleVerifier.compile_moduleR   sY     XX^^^'(ABB###""$  " ^^^s   /A9 A99B
	c                h   V P                   P                  ;_uu_ 4        V P                  '       gU   V P                  4        V P                  '       g3   V P                  '       g   V P                  4        V P                  4        V P                  4       uuRRR4       #   + '       g   i     R# ; i)zGet a C module from this Verifier instance.
Returns an instance of a FFILibrary class that behaves like the
objects returned by ffi.dlopen(), but that delegates all
operations to the C module.  If necessary, the C code is written
and compiled first.
N)r9   rd   rV   _locate_modulerU   re   rk   _load_libraryrl   s   &r   load_libraryVerifier.load_library\   sq     XX^^^#####%'''+++**,((*%%' ^^^s   4B B &/B  B1	c                    \         P                  P                  V P                  4      pVP	                  R ^4      ^ ,          pVP                  R4      '       d   \        \        R4      '       d   VRR pV# )._dgettotalrefcountN)rP   rQ   basenamerS   splitendswithhasattrrD   )r   ry   s   & r   get_module_nameVerifier.get_module_namel   sc    77##D$7$78 >>#q)!, T""ws4F'G'G}Hr   c                   V P                   '       gJ   V P                  P                  ;_uu_ 4        V P                   '       g   V P                  4        R R R 4       \        P
                  ! V P                  4      pV P                  4       p\        P                  ! W3/ V P                  B #   + '       g   i     La; ir   )
rU   r9   rd   re   r   maybe_relative_pathrR   r}   get_extensionrA   )r   
sourcenamemodnames   &  r   r   Verifier.get_extensionw   s    '''&&(   !44T5H5HI
&&(((J		JJ  s   #B--B=	c                .    V P                   P                  # r   )r=   _gen_python_modulerl   s   &r   generates_python_module Verifier.generates_python_module   s    }}///r   c                   V'       d   \         P                  P                  V4      '       d   \         P                  P                  V4      pVP                  4       p\        P
                   Fq  pWA9   g   K  W,          p\        V\        \        34      '       g   \        R V: R24      hV Uu. uF"  p\         P                  P                  W64      NK$  	  ppWQV&   Ks  	  V# u upi )z	keyword 'z' should be a list or tuple)rP   rQ   dirnamecopyr   LIST_OF_FILE_NAMESr   listtuplerB   rC   )r   rA   r[   r   r^   lstfns   &&&    r   r@   Verifier.make_relative_to   s    277??;77ggook2G99;D"55;)C%cD%=99'+.)1 2 2?BCs277<<4sCC #I 6  Ds   0(C$c                   \         P                  P                  V P                  4      '       g{   V P                  '       d(    \        V P                  R R R.4      pTP                  pMR pV P                  P                  V P                  4       V\        4       4      pVf   R # W0n        V P                  P                  4        RV n        R #   \         d     R # i ; i)N__doc__T)rP   rQ   isfilerS   rT   
__import__ImportError__path__r=   find_moduler}   rM   collect_typesrV   )r   pkgrQ   filenames   &   r   rp   Verifier._locate_module   s    ww~~d1122$T%5%5tTI;OC ||}}001E1E1G1A1CEH"*##% # s   C CCc                    WP                   n         V P                   P                  4        V P                   =R #   T P                   =i ; ir   )r=   _fwrite_source_to_frf   s   &&r   _write_source_toVerifier._write_source_to   s6    	!MM++-  s	   : Ac                h   Ve   V P                  V4       R # \        4       pV P                  V4       VP                  4       p\        P                  P                  V P                  4      '       d=   \        V P                  R4      ;_uu_ 4       pVP                  4       V8X  * pR R R 4       MRpX'       dN   \        V P                  4       \        V P                  R4      ;_uu_ 4       pVP                  V4       R R R 4       RV n        R #   + '       g   i     Ln; i  + '       g   i     L,; i)NrTw)r   r   getvaluerP   rQ   existsrR   openread_ensure_dirr   rU   )r   rg   fsource_datafpneeds_writtens   &&    r   re   Verifier._write_source   s    !!$' 
A!!!$**,K ww~~d1122$--s33r)+k$BM 43 !% D//0$--s33rHH[) 4  $D 43 43s   D+D!D	!D1	c                   \         P                  P                  V P                  4      p\        P
                  ! WP                  4       4      p \        P                  ! W P                  4      pV'       g6   \        V P                  4       \        P                  ! W P                  4       RV n        R#   \         d    R p LUi ; i)FTN)rP   rQ   r   rR   r   compiler   samefilerS   OSErrorr   shutilmoverV   )r   rO   outputfilenamesames   &   r   rk   Verifier._compile_module   s    !4!45$,,V5G5G5IJ	''8K8KLD ++,KK(;(;<  	D	s    B5 5CCc                    V P                   '       g   Q hV P                  e&   V P                  P                  V P                  4      # V P                  P                  4       # r   )rV   r?   r=   rr   rl   s   &r   rq   Verifier._load_library   sJ    ::!==--djj99==--//r   )rV   rU   r=   rT   r9   r?   rA   rS   r:   rR   rO   )NNN F.cNNr   )r#   r$   r%   r&   ra   rh   rm   rr   r}   r   r   r@   rp   r   re   rk   rq   r'   r(   )r*   s   @r   r,   r,      sM     '!R%#( 	K0  &!$2 0 0r   r,   Fc                 
   \         '       d   R pV'       g0   R\        P                  9   d   R pM ^ RIpV P
                  VJd   R pV'       d   ^RIHp VP                  # ^RIH	p VP                  #   \         d    Rp LMi ; i)T__pypy__N?)vengine_gen)vengine_cpy)_FORCE_GENERIC_ENGINErD   builtin_module_names_cffi_backendr   _backendr   r   VGenericEnginer   VCPythonEngine)r9   rY   r   r   r   s   &&   r   r<   r<      sx    #111#' $$ ||=0'+$!)))!)))  $ #$s   A2 2BBc                     \         '       d   \         # \        P                  P                  R 4      p V '       d   V # \        P
                  ! ^4      P                  P                  p\        P                  P                  \        P                  P                  \        P                  P                  V4      R4      4      # )CFFI_TMPDIR__pycache__)_TMPDIRrP   environgetrD   	_getframef_codeco_filenamerQ   abspathrC   r   )resultr   s     r   rN   rN      sv    wZZ^^M*F}}Q&&22H77??277<<(A(* + +r   c                
    V s R# )z:Set the temporary directory to use instead of __pycache__.N)r   )r   s   &r   
set_tmpdirr      s	     Gr   c                   T ;'       g    \        4       p  \        P                  ! V 4      pT'       d   RpM\	        4       ^ ,          P                  4       pT F  pTP                  4       P                  R4      '       g   K*  TP                  4       P                  T4      '       g(   TP                  4       P                  R4      '       g   Kv   \        P                  ! \        P                  P                  Y4      4       K  	  \        P                  P                  T R4      .pT F  p \        P                  ! T4       Fp  p\        P                  P                  Yd4      p\        P                  P                  T4      '       d   TP                  T4       KZ  \        P                  ! T4       Kr  	  K  	  R#   \         d     R# i ; i  \         d     EK  i ; i  \         d     K  i ; i)zyClean up the temporary directory by removing all files in it
called `_cffi_*.{c,so}` as well as the `build` subdirectory.Nr   r4   build)rN   rP   listdirr   rM   lower
startswithr{   unlinkrQ   rC   isdirappend)rO   keep_sofilelistr   r   	clean_dirdirs   &&     r   cleanup_tmpdirr     sf    ,,*,F::f% !#A&,,.88:  **
##F++rxxz/B/B4/H/H		"'',,v23	  fg./I	jjoWW\\#*77==$$$$R(IIbM &       		s6   F= 3G-B
G"=GGGG"G10G1c                  d    \        4       p V '       g   \        P                  R 8X  d   R.p V # R.p V # )win32z.pydz.so)r   rD   platform)suffixess    r   rM   rM   $  s5    "$H<<7"xH O wHOr   c                     \         P                  P                  V 4      pV'       d@   \         P                  P                  V4      '       g   \         P                  ! V4       R # R # R # r   )rP   rQ   r   r   makedirs)r   r   s   & r   r   r   /  s<    ggooh'Grww}}W--
G .wr   )r6   r6   r5   )NF)rD   rP   rH   r   ior   r   r   errorr   rE   importlib.machineryr   r   r   StringIOr   BytesIOobjectr,   r   r<   r   rN   r   r   rM   r   r
   r   r   <module>r      s    % $ $ *  $v9 ,
 t{{H+2:: +z0v z0|  *, +
>	r   