[SCM] Samba Shared Repository - branch v3-2-test updated
ma at sernet.de
Thu Aug 14 20:24:32 GMT 2008
Jeremy Allison wrote:
> On Thu, Aug 14, 2008 at 01:06:04PM -0700, Herb Lewis wrote:
> > I was just going by the parameter list. The function expected
> > a TALLOC_CTX * and we were passing a auth_serversupplied_info *
> All pointers can be a TALLOC_CTX *. A TALLOC_CTX * is actually
> a synonym for a void *.
To elaborate a bit, anything that has been allocated with talloc,
can usefully serve as a talloc context itself. Usually structs
that have members that need to be allocated are good candidates
for this usage scheme: when you TALLOC_FREE the outermost struct ptr
all the allocated members will be freed along with it.
This is commonly used in samba code.
Cheers - Michael
Michael Adam <ma at sernet.de> <obnox at samba.org>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080814/4404c667/attachment.bin
More information about the samba-technical