
    3jG                     x   S r SSKJr  SSKJr   " S S\5      rS r\S:X  a  SSKJ	r	  \	R                  r/ rS	 r\" \5      " \5      r\" 5         \R                   S
:X  d   e\R                  R                  S:X  d   e\R                  S:X  d   e\R                   \L d   e\R"                  \L d   e\(       d   egg)z6Simplistic wrapper decorator for Python-coded wrappers    )Curry)MODULE_ANNOTATIONSc                       \ rS rSrSrSrg)_LazyWrapper   z2Marker to tell us that an object is a lazy wrapper N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       L/home/wildlama/miniconda3/lib/python3.13/site-packages/OpenGL/lazywrapper.pyr   r      s    <r   r   c                    ^  U 4S jnU$ )a  Produce a lazy-binding decorator that uses baseFunction

Allows simple implementation of wrappers where the
whole of the wrapper can be summed up as do 1 thing
then call base function with the cleaned up result.

Passes baseFunction in as the first argument of the
wrapped function, all other parameters are passed
unchanged.  The wrapper class created has __nonzero__
and similar common wrapper entry points defined.
c                   > U4S jnU4S jn[        U R                  [        4UU R                  UUT[	        U S[	        TSS5      5      S.5      nU" U T5      nU R                  Ul        [        TS5      (       a  TR                  Ul        U$ )zWrap wrapper with baseFunctionc                    > [        T5      $ )N)boolselfbaseFunctions    r   __bool__$lazy.<locals>.wrap.<locals>.__bool__   s    ''r   c                 ,   > S< STR                   < S3$ )NzOpenGL.lazywrapper.lazyz( z ))r	   r   s    r   __repr__$lazy.<locals>.wrap.<locals>.__repr__   s    )%% r   restypeN)r   r   __nonzero__r   wrappedOperationr   r
   )typer	   r   r   getattrhasattrr
   )wrapperr   r   _with_wrapperwith_wrapperr   s        r   wraplazy.<locals>.wrap   s    	(	
 g.. #  ,w	',yQU2VWB
  %W\: ' 0 0L,00&2&=&=L#r   r   )r   r&   s   ` r   lazyr(      s    , Kr   __main__)GLUc                 .    [         R                  U 5        g)TestingN)outputappend)bases    r   testwrapr0   1   s    tr   r,   r0   N)r   OpenGL.latebindr   OpenGLr   r   r(   r	   
OpenGL.rawr*   gluNurbsCallbackDatafuncr-   r0   testlazy	__class__r   wrapperFunctionr   r   r   <module>r9      s    < ! %=E ="J z##DF T|X'HKy(((&&*444
***  D(((##x///M6 r   