API : constness ?
Andrea Griffini
agriff at tin.it
Tue Jun 1 02:10:07 EDT 2004
On Mon, 31 May 2004 03:26:53 +0200, BenoƮt Dejean <bnet at ifrance.com>
wrote:
>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...
Andrea
More information about the Python-list
mailing list