API : constness ?
agriff at tin.it
Tue Jun 1 08:10:07 CEST 2004
On Mon, 31 May 2004 03:26:53 +0200, Benoît Dejean <bnet at ifrance.com>
>using const helps gcc to move these data to the text segment
This may sound terrible, but indeed the data that a
"pointer to constant" is pointing to is not (in general)
constant. Being a "pointer to constant" is a property of
the *pointer*, not of the *pointed data*.
Const pointers in interfaces are designed to be an help
for the (distracted) programmers, they can't be an help
for the compiler.
That const-ness really helps or not is another issue...
More information about the Python-list