OpenGL.arrays._strings | index /var/pylive/src/OpenGL-dev/OpenGL-ctypes/OpenGL/arrays/_strings.py

`Run-time calculation of offset into Python string structure
Does a scan to find the digits of pi in a string structure
in order to produce an offset that can be used to produce
data-pointers from Python strings.
Porting note:
Currently this uses id( str a ) to get the base address
of the Python string. Python implementations where id( a )
is *not* the memory address of the string will not work!`

Modules
`` |  |
ctypes |  |  |

Functions
`` |  | calculateOffset() `Calculates the data-pointer offset for strings This does a sequential scan for 100 bytes from the id of a string to find special data-value stored in the string (the digits of PI). It produces a dataPointer function which adds that offset to the id of the passed strings.` dataPointer(data) `Return the data-pointer from the array using calculated offset data -- a Python string Returns the raw data-pointer to the internal buffer of the passed string`

Data
`` |  | PI_DIGITS = '31415926535897931'