svn commit: samba r16711 - in trunk/source/passdb: .

Tim Potter tpot at samba.org
Mon Jul 3 00:33:07 GMT 2006


On Sat, 2006-07-01 at 10:02 +0200, Volker Lendecke wrote:
> On Fri, Jun 30, 2006 at 03:35:58PM -0700, Jeremy Allison wrote:
> > > I think I'm missing the broader problem here, because part of me is
> > > asking 'What is wrong with talloc_steal()?'.
> > 
> > Unmaintainable code.
> 
> That's maybe a bit brief :-)
> 
> I think there's one use pattern where it would make sense:
> It's creating a temporary talloc context in a routine
> handing the resulting structure to the context that we were
> given. 

Yes.  This is how some higher level Samba 4 RPC client routines would
work, except I don't think they're implemented yet.  (-:

The pidl generated code returns results in a single talloc context but
the caller is only interested in part of the result.  Cherry picking the
interesting bits for the caller using talloc_steal() is the nicest way
to do this without having to copy potentially large amounts of data.


Tim.



More information about the samba-technical mailing list