
    3j^                        S r SSKrSSKr\R                  SS S:  a  \" S5      eSSK7  SrS=rrSr	S	\	-  r
\	\-  r\	rS
\
-  rSr\" \S\R                   5      rS\R$                  4S\R$                  4S\4S\4S\R&                  4S\R&                  4S\R(                  4S\R*                  " \5      4S\R*                  " \5      4S\R*                  " \5      4/
r\R                  SS S::  d  \R                  SS S:  a  \R/                  S\R$                  4/5        O.\R/                  S\R0                  S-  4S\R$                  4/5         " S S\R2                  5      r\R*                  " \5      r \R8                  R:                  r\R>                  /\l         \R&                  \l!        \R8                  RH                  r%\R>                  /\%l         \R8                  RL                  r'\R>                  \\R&                  /\'l         \R&                  \'l!        \R8                  RP                  r)\/\)l         S\)l!        g! \" a  r#S r Sr#C#NSr#C#ff = f)zFPython 3.x buffer-handling (currently just for bytes/bytearray types)
    N   )r      z+Buffer interface only usable on Python 2.6+   )*             	c_ssize_tbufobjlenitemsizereadonlyndimformatshapestrides
suboffsets)   r   internal
smalltablec                   z    \ rS rSrSr\\\-  \-  4S j5       r	\
r
\S 5       rS r\S 5       rS rSS	 jrS
 rSrg)	Py_buffer6   z-Wrapper around the Python buffer structure...c                     [        U5      (       d  [        UR                  < S35      eU " 5       n[        XU5      nUS:w  a  [	        SU< 35      eUR
                  (       d  [	        SU< 35      eU$ )z0Create a new Py_buffer referencing ram of objectz& type does not support Buffer Protocolr   zUnable to retrieve Buffer from zNull pointer result from )CheckBuffer	TypeError	__class__	GetBuffer
ValueErrorr   )clsobjectflagsr   results        P/home/wildlama/miniconda3/lib/python3.13/site-packages/OpenGL/arrays/_buffers.pyfrom_objectPy_buffer.from_object9   sl    
 6"">D>N>NP  e6.Q;FLMMwwfFGG
    c                 4    U R                   S U R                   $ N)r   r   selfs    r&   dimsPy_buffer.dimsM   s    zz+DII&&r)   c                      U R                   S   $ )Nr   )r   r,   s    r&   __len__Py_buffer.__len__Q   s    zz!}r)   c                 X    U R                   (       a  U R                   S U R                   $ g r+   )r   r   r,   s    r&   dim_stridesPy_buffer.dim_stridesT   s!    <<<<$)),,r)   c                     g r+    r,   s    r&   	__enter__Py_buffer.__enter__Z       r)   Nc                 >    U R                   (       a  [        U 5        g g r+   r   ReleaseBuffer)r-   exc_type	exc_value	tracebacks       r&   __exit__Py_buffer.__exit__]       88$ r)   c                 >    U R                   (       a  [        U 5        g g r+   r<   r,   s    r&   __del__Py_buffer.__del__a   rC   r)   r7   )NNN)__name__
__module____qualname____firstlineno____doc__classmethodPyBUF_STRIDESPyBUF_FORMATPyBUF_C_CONTIGUOUSr'   _fields_propertyr.   r1   r4   r8   rA   rE   __static_attributes__r7   r)   r&   r   r   6   sf    7(<7:LL " H' '  
  r)   r   c                     g r+   r7   )xs    r&   r   r   o   r:   r)   )*rK   ctypessysversion_infoImportError_arrayconstantsPyBUF_SIMPLEPyBUF_WRITABLEPyBUF_WRITEABLEPyBUF_NDrM   PyBUF_CONTIGPyBUF_CONTIG_ROrO   rN   getattrc_ulongr   c_void_pc_intc_char_pPOINTERrP   extendc_size_t	Structurer   BUFFER_POINTER	pythonapiPyObject_CheckBufferr   	py_objectargtypesrestypeAttributeErrorerr	Py_IncRefIncRefPyObject_GetBufferr    PyBuffer_Releaser=   r7   r)   r&   <module>ru      sn   BQ& 
C
DD #) )!.(m+  FK8	 FOO
FOO
IV\\vfnnY'(y)*6>>),- BQ6!S%5%5bq%9V%C OO)	
 OO6??Q./)	
-    - ` 	*""77K",,-K ,,K 
			#	###$//	&&E	 LL	   11()    s   79I I	II