+
    :i,                         ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIt ! R R]	4      t
R tR t ! R	 R
]4      t ! R R]4      t]R8X  d   ]P                   ! 4        R# R# )    N)jit)types)TestCasec                   &   a  ] tR t^
t o R tRtV tR# )Dummyc                    V^,           # )    )selfothers   &&\/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_func_lifetime.py__add__Dummy.__add__   s    qy    r
   N)__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classdict__s   @r   r   r   
   s      r   r   c                     V ^,           #    r
   xs   &r   global_usecase1r      s    q5Lr   c                      \         ^,           # r   )
global_objr
   r   r   global_usecase2r!      s    >r   c                   l   a  ] tR t^t o RtR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tRtV tR# )TestFuncLifetimezH
Test the lifetime of compiled function objects and their dependencies.
c                    V P                  \        VP                  4      ^4       \        VP                  P	                  4       4      ^ ,          pVP
                  # )zF
Get the single implementation (a C function object) of a dispatcher.
)assertEquallen	overloadslistvaluesentry_point)r   
dispatchercress   && r   get_implTestFuncLifetime.get_impl   sI     	Z112A6J((//1215r   c                   R  p\        R/ VB ! V4      pV P                  V! ^4      ^4       V P                  V4      pW#VP                  3 Uu. uF  p\        P
                  ! V4      NK  	  ppR;p;p;r4\        P                  ! 4        T P                  V Uu. uF	  qw! 4       NK  	  upR.\        V4      ,          4       R# u upi u upi )c                     V ^,           # r   r
   r   s   &r   f5TestFuncLifetime.check_local_func_lifetime.<locals>.f%   s    q5Lr   N)zint32(int32))
r   assertPreciseEqualr-   __self__weakrefrefgccollectr%   r&   )r   jitargsr1   c_fcfuncobjrefswrs   &,      r   check_local_func_lifetime*TestFuncLifetime.check_local_func_lifetime$   s    	 ,G,Q/A*c" ./U^^,DE,DSC ,DE $$$a$#


.2"$.T0BC F /s   CC	c                *    V P                  R R7       R# T)forceobjNr?   r   s   &r   test_local_func_lifetime)TestFuncLifetime.test_local_func_lifetime6       &&&5r   c                *    V P                  R R7       R# T)nopythonNrD   rE   s   &r   test_local_func_lifetime_npm-TestFuncLifetime.test_local_func_lifetime_npm9   rH   r   c                   \        R/ VB ! \        4      pV P                  V! ^4      ^4       V P                  V4      p\        P
                  ! V4      pW#P                  3 Uu. uF  p\        P
                  ! V4      NK  	  ppR;p;r#\        P                  ! 4        T P                  V Uu. uF	  qD! 4       NK  	  upR.\        V4      ,          4       R# u upi u upi )r   Nr
   )r   r   r3   r-   r5   r6   r4   r7   r8   r%   r&   )r   r9   r:   r;   r>   r<   r=   s   &,     r   check_global_func_lifetime+TestFuncLifetime.check_global_func_lifetime<   s    nGn_-A*c"[[-0..,AB,ASC ,AB   c


.2"$.T0BC C /s   $C.Cc                *    V P                  R R7       R# rB   rO   rE   s   &r   test_global_func_lifetime*TestFuncLifetime.test_global_func_lifetimeH       '''6r   c                *    V P                  R R7       R# rJ   rR   rE   s   &r   test_global_func_lifetime_npm.TestFuncLifetime.test_global_func_lifetime_npmK   rU   r   c                   \        4       s\        R/ VB ! \        4      pV P	                  V! 4       ^4       V\        3 Uu. uF  p\
        P                  ! V4      NK  	  ppR;p;ps\        P                  ! 4        T P                  V Uu. uF	  qU! 4       NK  	  upR.\        V4      ,          4       R# u upi u upi )   Nr
   )r   r    r   r!   r3   r5   r6   r7   r8   r%   r&   )r   r9   r:   r<   r=   r>   s   &,    r   check_global_obj_lifetime*TestFuncLifetime.check_global_obj_lifetimeN   s    
 W
nGn_-q)-0*,=>,=SC ,=>!%%%cJ


.2"$.T0BC ? /s   B6B;c                *    V P                  R R7       R# rB   )r[   rE   s   &r   test_global_obj_lifetime)TestFuncLifetime.test_global_obj_lifetime]   rH   r   c                D  a R p\        R/ VB ! V4      oSP                  4        V3R lp\        R/ VB ! V4      pVP                  4        V P                  V! ^4      ^24       VSW4V P                  S4      P                  V P                  V4      P                  3 Uu. uF  p\
        P                  ! V4      NK  	  ppR;p;p;o;r4\        P                  ! 4        T P                  V Uu. uF	  qw! 4       NK  	  upR.\        V4      ,          4       R# u upi u upi )zk
When a jitted function calls into another jitted function, check
that everything is collected as desired.
c                     V ^
,          # )
   r
   )as   &r   mult_10?TestFuncLifetime.check_inner_function_lifetime.<locals>.mult_10e   s    r6Mr   c                 "   < S! V ^,           4      # )   r
   )r   	c_mult_10s   &r   do_math?TestFuncLifetime.check_inner_function_lifetime.<locals>.do_mathk   s    QU##r   N)z
intp(intp))
r   disable_compiler%   r-   r4   r5   r6   r7   r8   r&   )	r   r9   rd   ri   	c_do_mathr<   wrswrh   s	   &,      @r   check_inner_function_lifetime.TestFuncLifetime.check_inner_function_lifetime`   s   
	 009	!!#	$ 009	!!#1r* Gi(11i(11 %(w{{3 	 
 ;?>>g>	>G


s+s!!#s+dVc#h->? ,s    D.Dc                *    V P                  R R7       R# rB   ro   rE   s   &r   test_inner_function_lifetime-TestFuncLifetime.test_inner_function_lifetime|       **D*9r   c                *    V P                  R R7       R# rJ   rr   rE   s   &r    test_inner_function_lifetime_npm1TestFuncLifetime.test_inner_function_lifetime_npm   ru   r   r
   N)r   r   r   r   __doc__r-   r?   rF   rL   rO   rS   rW   r[   r^   ro   rs   rw   r   r   r   s   @r   r#   r#      sO      D$66
D77D6@8:: :r   r#   c                   &   a  ] tR t^t o R tRtV tR# )TestLifeTimeIssuec                   a	 ^ RI Hp ^ RIo	VR 4       pVV	3R l4       pS	P                  ^ ^...4      pS	P                  RR..4      pV! 4       pV! V^ ,          V4       V! 4       pV! V^ ,          V4       V! 4       pR# )r   )njitNc                 L    VP                   ^ ,          pV^ 8w  d
   V^ ,          p^ # )r   )shape)pointpolygonsnum_polygonsintentionally_unused_variables   &&  r   is_point_in_polygons@TestLifeTimeIssue.test_double_free.<locals>.is_point_in_polygons   s%    #>>!,Lq 08-r   c                  >   < S P                  ^
S P                  R7      # )rb   )dtype)emptyint64)nps   r   dummy1TestLifeTimeIssue.test_double_free.<locals>.dummy   s    88Bbhh8//r   g      ?g      )numbar}   numpyarray)
r   r}   r   r   r   pointsrc   bcr   s
   &        @r   test_double_free"TestLifeTimeIssue.test_double_free   s     
	 
	 
	0 
	0 88q!fXJ'D#;-(GVAY1GVAY1Gr   r
   N)r   r   r   r   r   r   r   r   s   @r   r{   r{      s      r   r{   __main__)r7   r5   r   r   
numba.corer   numba.tests.supportr   unittestobjectr   r   r!   r#   r{   r   mainr
   r   r   <module>r      sa    	    ( F i:x i:X @ zMMO r   