+
    VBi7                     2   ^ RI t ^RIHtHt ^RIHt ^RIHt ^RIH	t	 ^RIH
t
 ^RIHt ^RIHt ^ RIt^ RIt^ RIt ! R	 R
]	P"                  4      t ! R R]4      t ! R R]P(                  4      t ! R R]4      t ! R R]P.                  4      tRR ltR# )    N)parse_from_stringsStringParseContext)FileSourceDescriptor)CompileError)Symtab)Naming)Code)Optionsc                   B   a a ] tR t^t oR tV 3R ltRR ltRtVtV ;t	# )NonManglingModuleScopec                    Wn         R V n        VP                  RR4      V n        \        P
                  P                  ! V .VO5/ VB  R # )NcppF)prefixcython_scopepopr   r   ModuleScope__init__)selfr   argskws   &&*,@/usr/lib/python3.14/site-packages/Cython/Compiler/UtilityCode.pyr   NonManglingModuleScope.__init__   s?     66%'##D64626    c                2   < R Vn         \        SV `	  WV4      # T)usedsuperadd_imported_entry)r   nameentrypos	__class__s   &&&&r   r   )NonManglingModuleScope.add_imported_entry   s    
w)$s;;r   c                    V'       dX   V\         P                  \         P                  \         P                  \         P                  39   d   V P
                  pV: V: 2# \        P                  P                  W4      # N)	r   typeobj_prefixfunc_prefix
var_prefixpyfunc_prefixr   r   r   mangle)r   r   r   s   &&&r   r*   NonManglingModuleScope.mangle   s\    &//1C1CVEVEVX^XlXlmm #T**%%,,T::r   )r   r   r   r%   )
__name__
__module____qualname____firstlineno__r   r   r*   __static_attributes____classdictcell____classcell__r"   __classdict__s   @@r   r   r      s     7<; ;r   r   c                   .   a  ] tR t^&t o RtRR ltRtV tR# )CythonUtilityCodeContextNc                (   V'       d   \        R 4      hWP                  8w  d/   WP                  9  d   \        R4      hV P                  V,          # V P                  f)   \	        V P
                  VRW P                  R7      V n        V P                  # )z/Relative imports not supported in utility code.z%Only the cython cimport is supported.N)parent_modulecontextr   )AssertionErrormodule_namemodulesscoper   r   r   )r   r;   from_moduler!   need_pxdabsolute_fallbackrelative_imports   &&&&&&&r   find_module$CythonUtilityCodeContext.find_module)   sx     !RSS***,,.$%LMM||K00::/[dPXPXZDJ zzr   )r=   )NNTTF)r,   r-   r.   r/   r=   rB   r0   r1   r4   s   @r   r6   r6   &   s     E r   r6   c                      a a ] tR t^9t oRtRtRR ltR tR tR t	RR lt
RR lt]V 3R	 l4       t]RR
 l4       tRR lt]R 4       tRtVtV ;t# )CythonUtilityCodea&  
Utility code written in the Cython language itself.

The @cname decorator can set the cname for a function, method of cdef class.
Functions decorated with @cname('c_func_name') get the given cname.

For cdef classes the rules are as follows:
    obj struct      -> <cname>_obj
    obj type ptr    -> <cname>_type
    methods         -> <class_cname>_<method_cname>

For methods the cname decorator is optional, but without the decorator the
methods will not be prototyped. See Cython.Compiler.CythonScope and
tests/run/cythonscope.pyx for examples.
Tc
                6   / p
VeR   ^RI Hp VP                  4        F   w  r\        W4      '       g   K  WV&   WV&   K"  	  \        P
                  ! WWR4      pWn        W n        WPn        W0n	        T;'       g    . V n
        W`n        Wn        Wn        Wn        R # )N)BaseType)
PyrexTypesrH   items
isinstancer	   sub_tempitaimplr   filer   requires
from_scopeouter_module_scopecompiler_directivescontext_types)r   rM   r   r   rO   rN   rP   r9   rR   rQ   rS   rH   keyvalues   &&&&&&&&&&    r   r   CythonUtilityCode.__init__L   s     ,%mmo
e..#&CL).#& . ##D4>D			 B$"4#6 *r   c                t    \        V\        4      '       d"   V P                  4       VP                  4       8H  # R # )F)rK   rF   _equality_params)r   others   &&r   __eq__CythonUtilityCode.__eq__g   s0    e.//((*e.D.D.FFFr   c                    V P                   p\        V\        4      '       d   VP                  pK$  V P                  WP
                  3# r%   )rQ   rK   r   outer_scoperM   rR   )r   r]   s   & r   rX   "CythonUtilityCode._equality_paramsm   s;    --&<==%11Kyy+'?'???r   c                ,    \        V P                  4      # r%   )hashrM   )r   s   &r   __hash__CythonUtilityCode.__hash__s   s    DIIr   c                  a  ^RI Hp V.p^RIHpHp \        S P                  S P                  V'       d   VP                  4       MRR7      pS P                  Vn	        W'n
        \        S P                  S P                  VRRR7      pVP                  VRVR7      p	V'       d<   . p
V	 F1  pV
P                  V4       \        WP                   4      '       g   K1   M	  T
p	VP#                  V4      pVP$                  pVP'                  WVR	7      p	R
 pS P(                  '       d.   VP'                  W! S P(                  4      VP                   R	7      p	S P*                   Fp  p\        V\,        4      '       g   K  \/        VR4      '       g   K/  V'       d   K9  VP'                  W! VP0                  P2                  4      VP                   R	7      p	Kr  	  S P4                  '       d%   V 3R lpVP'                  V	VVP                   R	7      p	S P6                  '       d%   V 3R lpVP'                  V	VVP                   R	7      p	VP9                  WRR7      w  ppV'       d   Q V4       hVS n        V# )   )AutoTestDictTransform)PipelineParseTreeTransformsF)rR   r   T)r9   allow_struct_enum_decoratorin_utility_codepyx)exclude_classes)beforec                    a  V 3R  lpV# )c                 >   < V P                   P                  S4       V # r%   )r=   merge_in)module_noder=   s   &r   merge_scope_transformNCythonUtilityCode.get_tree.<locals>.merge_scope.<locals>.merge_scope_transform   s    !!**51""r    )r=   rq   s   f r   merge_scope/CythonUtilityCode.get_tree.<locals>.merge_scope   s    # )(r   treec                 >   < SP                   V P                  n        V # r%   )rQ   r=   r]   )rp   r   s   &r   scope_transform3CythonUtilityCode.get_tree.<locals>.scope_transform   s    040G0G!!-""r   c                    < \        4       pSP                  P                  4        FB  w  r#\        VR V4      pV P                  P                  W#RRR7      pWAJd   WCn        RVn        KD  	  V # )r    Nextern)
visibilityT)objectrS   rJ   getattrr=   declare_typer    in_cinclude)rp   dummy_entryr   typeold_type_entryr    r   s   &     r   rx   ry      sn    $h"&"4"4":":"<JD &-T7K%HN'--::4tX`:aE%8%3
(,E% #= #"r   )	printtree)AnalysedTreeTransformsre    rf   rg   r6   r   rR   is_cppr   r   r   rM   create_pipelineappendrK   AnalyseDeclarationsTransformCnameDirectivesTransformInterpretCompilerDirectivesinsert_into_pipelinerP   rO   rF   hasattrrv   r=   rQ   rS   run_pipeline)r   entries_onlyr   re   excludesrf   rg   r9   rv   pipelinept	transformrl   rt   deprx   errs   f&&               r   get_treeCythonUtilityCode.get_treev   s;   A **3*II4+C+C)5##%5B +!IItyy't " ++GUH+UAa!Q!QRR 
 H'@@I	 %@@008> 1 @	) ???44+doo6*GG 5 IH ==C#011gc66J6JS_S_#88k#((..9.KK 9 M ! """#  44/*GG 5 IH #  44/*GG 5 IH ++He+Ldw	r   c                    R # r%   rs   )r   globalstateused_bys   &&&r   put_codeCythonUtilityCode.put_code   s    r   c                   < \         P                  ! R V4      '       d    \        P                  P	                  W4      # \
        SV `  ! W3/ VB # )z[.]c(pp)?::)researchr	   UtilityCodeload_cachedr   load)clsutil_code_name	from_filekwargsr"   s   &&&,r   r   CythonUtilityCode.load   sA    99]N33 ##//JJw|N@@@r   c                X    V P                   ! W3/ VB pVP                  VP                  3# )zB
Load a utility code as a string. Returns (proto, implementation)
)r   protorM   )r   r   r   r   utils   &&&, r   load_as_string CythonUtilityCode.load_as_string   s*    
 xx<V<zz499$$r   c                   V P                  RVR7      pVP                  P                  pVP                  R4       VP                  R4       VP                  R4       VP                  R4       VP	                  4        F  pWn        W'n        K  	  VP                  pVP                  VRVR7       Wn        V P                   F)  p	V	P                  '       g   K  V	P                  WR7       K+  	  V# )	z
Declare all entries from the utility code in dest_scope. Code will only
be included for used entries. If module_name is given, declare the
type entries with that name.
T)r   r   r,   __file____builtins____doc__)merge_unused	allowlistr   )r   r=   entriesr   valuesutility_code_definitionr   ro   rO   is_cython_utilitydeclare_in_scope)
r   
dest_scoper   r   r   rv   r   r    original_scoper   s
   &&&&&     r   r   "CythonUtilityCode.declare_in_scope   s     }}$\}J**$$JJN#I^^%E,0)J & NS
==C$$$$$Z$K ! r   c                b    ^RI Hp \        V4      pRpV F  pW@9   g   K  W,          W$&   K  	  V# )z
Cython utility code should usually only pick up a few directives from the
environment (those that intentionally control its function) and ignore most
other compiler directives. This function provides a sensible default list
of directives to copy.
)_directive_defaults)bindingalways_allow_keywordsallow_none_for_extension_argsauto_pickleccomplexc_string_typec_string_encodingzoptimize.inline_defnode_callszoptimize.unpack_method_callsz&optimize.unpack_method_calls_in_pyinitzoptimize.use_switch)r
   r   dict)current_directivesr   utility_code_directivesinherited_directive_namesr   s   &    r   filter_inherited_directives-CythonUtilityCode.filter_inherited_directives   sB     	1"&':";%M! .D)0B0H'- . '&r   )
rR   rS   rN   rP   rM   r   rQ   r   rO   rv   )	__pyxutilr   NNNNNN)FNr%   FNN)r,   r-   r.   r/   r   r   r   rZ   rX   ra   r   r   classmethodr   r   r   staticmethodr   r0   r1   r2   r3   s   @@r   rF   rF   9   s{       +6@Tl A A % %: ' ' 'r   rF   c                   B   a a ] tR tRt oV 3R ltRV 3R lltRtVtV ;t# )TemplatedFileSourceDescriptori  c                2   < \         SV `  W4       W0n        R # r%   )r   r   _context)r   filenamepath_descriptionr9   r"   s   &&&&r   r   &TemplatedFileSourceDescriptor.__init__  s    4r   c           	       < \         SV `  W4      ;_uu_ 4       pVP                  4       p\        P                  ! W@P
                  V P                  4      p\        P                  ! \        P                  ! VP                  VP                  4      4      VP                  VR 7      pRRR4       V#   + '       g   i     X# ; i))encodingerrorsN)r   get_file_objectreadr	   rL   r   r   ioTextIOWrapperBytesIOencoder   )r   r   error_handlingfdataretstreamr"   s   &&&    r   r   -TemplatedFileSourceDescriptor.get_file_object  s    W$X>>!668D""4FC%%bjjAJJ1G&HSTS]S]ftuF	 ?
  ?>
 s   BB//C 	)r   )NN)	r,   r-   r.   r/   r   r   r0   r1   r2   r3   s   @@r   r   r     s       r   r   c                   <   a  ] tR tRt o R tR tRR ltR tRtV t	R# )	CythonSharedUtilityCodei!  c                D    Wn         W n        W0n        W@n        R V n        R # r%   )	_pxd_name_shared_utility_qualified_nametemplate_contextrO   _shared_library_scope)r   pxd_nameshared_utility_qualified_namer   rO   s   &&&&&r   r    CythonSharedUtilityCode.__init__"  s     !.K+ 0 %)"r   c                   TpVP                  V P                  R R7       F  w  r4VP                  W4R7      pK  	  \        P                  P                  \        P                  P                  \        P                  4      ^ ,          RV P                  4      p V P                  P                  R\        P                  4      \        P                  P                  V4      ^,          ,           p\        WVV P                  4      pRVn        VP!                  WrV P                  4      w  rV	w  rW3VP"                  V P                  &   RVn        V'       d   Vh V#   \&         d     T# i ; i)F)rA   )
as_packageUtility.T)_split_qualified_namer   find_submoduleospathjoinsplitCythonr   r   replacesepsplitextr   r   ri   process_pxdutility_pxdspxd_file_loadedr   )r   r9   r=   r   
is_packagepxd_pathnamerel_pathsource_descr   resultpxd_codenodes	pxd_scopes   &&          r   rB   #CythonSharedUtilityCode.find_module)  s>    % ; ;D<_<_qv ; wD(((EE !x ww||GGMM&//*1-NN

	::BB3ORTRYRYRbRbcoRpqrRssH7PTPePefK*.K'!--k$BeBefKC)/&]4A3MG  0$(E!	    		s   B?E E*)E*Nc                   V P                   VP                  P                  9  d!   V P                  VP                  4      V n        V P
                   F.  pVP                  '       g   K  VP                  \        VR 7       K0  	  V P                  P                   F)  pVP                  VP                  WfP                  4       K+  	  V# )r   )r   r9   r   rB   r   rO   r   r   r=   c_class_entriesr   r   r!   )r   r   r   r   r   r   es   &&&&&  r   r   (CythonSharedUtilityCode.declare_in_scopeA  s    >>!5!5!B!BB)-)9)9,:N:N)OD&==C$$$$$U$F ! ++;;A))!&&!UU; <r   c                    V P                   VP                  P                  9  d!   V P                  VP                  4      V n        V P                  # r%   )r   r9   r   rB   r   )r   r   s   &&r   get_shared_library_scope0CythonSharedUtilityCode.get_shared_library_scopeL  s?    >>!5!5!B!BB)-)9)9,:N:N)OD&)))r   )r   r   r   rO   r   r   )
r,   r-   r.   r/   r   rB   r   r  r0   r1   rD   s   @r   r   r   !  s     *0	* *r   r   c                B    \        V .VO5/ VB P                  V4       R# )zT
Declare some declarations given as Cython code in declaration_string
in scope env.
N)rF   r   )declaration_stringenvprivate_typer   r   s   &&&*,r   declare_declarations_in_scoper  R  s"     (:4:6:KKCPr   r   )r   TreeFragmentr   r   Scanningr   Errorsr   r   r   r   r	   r
   os.pathr   r   r   r   r   r6   UtilityCodeBaserF   r   AbstractUtilityCoder   r  rs   r   r   <module>r     s     @ *        	 	;V// ;.1 &V',, V'r$8 .*d66 .*bQr   