r20242?

Jeremy Allison jra at samba.org
Wed Dec 20 17:24:22 GMT 2006


On Wed, Dec 20, 2006 at 06:20:29PM +1100, tridge at samba.org wrote:
> Alexander,
> 
>  > Of course it is not in the bytes, it is in the design of application.
>  > I'm not trying to convince that hierarchy is accessible in the sequence
>  > of bytes pointed to by the talloc()-ed structure. Rather, I'm pointing
>  > to the fact that allocating anything on that context _is_ changing an
>  > associated hierarchy and therefore, changing user data as a whole by
>  > spirit, if you'd accept such a comparison.
> 
> that 'spirit' doesn't matter.
> 
> the const keyword means "don't allow me to change the bytes accessible
> through this pointer, and assume for optimisations that they won't
> change". (not the exact words in the standard, but good enough).
> 
> That's all it means. You're trying to extend that to some vague notion
> of associated information, and that just isn't what const is all
> about.
> 
> If you want some other keyword that does what you want then invent one
> and make a tool like sparse use it. Don't try to imbue a C keyword
> with meanings it doesn't have.

+1 - const has *meaning*. I understand what it means
and it means what tridge says. It doesn't mean anything
else about associated bytes.

Jeremy.


More information about the samba-technical mailing list