r20242?

tridge at samba.org tridge at samba.org
Wed Dec 20 06:38:23 GMT 2006


Alexander,

 > This is not what I'm talking about. If hierarhy is used within
 > application then allocating something in a context is effectifely
 > changing that hierarchy, hence changing user data (of which this
 > hierarchy is a part).

no. The hierarchy is _not_ part of the user data. It's magic. It is
not in the bytes accessible from the pointers returned by talloc.

yes, the application can rely on the hierarchy. No, it's not part of
the user data in any pointer. Yes, that means the hierarchy is not
"visible" as user data anywhere in the application. That is not a
problem.

 > Of course, you could argue that a developer would probably be better by
 > adding linked list to the structure itself and managing it explicitly
 > but if talloc already provides this resource, why can't it be used?

it can and should be used, but that has absolutely nothing to do with
whether the variable should be marked const.

Cheers, Tridge


More information about the samba-technical mailing list