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

simo idra at samba.org
Mon Mar 13 00:36:46 GMT 2006


On Sun, 2006-03-12 at 16:32 -0800, Jeremy Allison wrote:
> On Sun, Mar 12, 2006 at 07:22:18PM -0500, simo wrote:
> > 
> > Yes, I'm following the streams of patches. Do you know what I thought
> > when I saw it?
> > "That would not have happened if we had a talloc hierarchy".
> 
> A talloc hierarchy hung off random pointers is a poor man's C++ (IMHO).
> It can be horribly misued. I'm wary of them at the moment.
> 
> > But I see you feel strongly (reading another reply while answering) ..
> > in that case why not just make talloc_free check for context not being
> > null itself instead of adding a really ugly (visually because of all
> > caps) macro ? :-)
> 
> Consistency with the Samba4 talloc. It's the Samba3 style here, I'd
> like to keep it consistent.

No TALLOC_FREE() actually adds something good, it makes the pointer NULL
after it is freed. This is very important in a code base like that of
samba3 which have not grown up with talloc as a programming paradigm, I
have not realized that before reading the last mails.

So for samba3 I think you are right, and TALLOC_FREE() does really make
sense to be used.

I'll commit a fix for that in the next hours, gotta go now.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the samba-cvs mailing list