r20242?

tridge at samba.org tridge at samba.org
Wed Dec 20 07:20:29 GMT 2006


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.

Cheers, Tridge


More information about the samba-technical mailing list