r20242?
Alexander Bokovoy
ab at samba.org
Tue Dec 19 13:20:47 GMT 2006
simo wrote:
> As we allocate them inside winbind_lookup_sid() I thought it to be
> misleading to mark them as const. I don't plan to modify them, but if
> in future someone does I'd thought that would prevent someone to just
> blindly strdup them, it would be a waste.
Speaking of allocations... With talloc() if we use some structure passed
in to the function as a parent context we don't change it directly but
rather modifying talloc's internal structures associated with this
pointer. So in this case would it be safe to still mark passed pointer
as const?
My thinking is against it -- i.e. you probably shouldn't specify const
for arguments-pointers which you intend to use as parent context in the
function.
--
/ Alexander Bokovoy
Samba Team http://www.samba.org/
ALT Linux Team http://www.altlinux.org/
Midgard Project Ry http://www.midgard-project.org/
More information about the samba-technical
mailing list