In this construction
const GLvoid * const *.
the second qualifier const
means that pointer const GLvoid *
is a const pointer. That is it is a constant pointer that points to a const object of type GLvoid
.
This parameter declaration
const GLvoid * const * indices
means that using pointer indices
you may not change the pointer (or pointers if this pointer points to the first element of an array of pointers) it points to.
Consider the following example
#include <stdio.h>
void f( const char **p )
{
p[0] = "B";
}
int main( void )
{
const char * a[1] = { "A" };
f( a );
puts( a[0] );
}
This function will be compiled successfully and you can change the value of a[0].
However if you rewrite the program the following way
#include <stdio.h>
void f( const char * const *p )
{
p[0] = "B";
}
int main( void )
{
const char * a[1] = { "A" };
f( a );
puts( a[0] );
}
The compiler issues an error like
prog.c:10:10: error: read-only variable is not assignable
p[0] = "B";
~~~~ ^
1 error generated.