talloc_stack.c?

Gerald (Jerry) Carter jerry at samba.org
Tue Jul 3 01:44:05 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Allison wrote:

> I'd vote +1 on this idiom.

+1 for me as well.  It is a very intuitive and should
make code more consistent.

The advantage over passing in an explicit ctx* is
that the function does not need to know if the
caller intends to be short lived or not.  You can then
assume that any ctx* passed in is longer lived and
use it appropriately.

I admit I like they "any pointer can be a context" idea
and use it for data structures but I also prefer the
"give me a defined context that I can use" methodology
for use outside of a defined structure and method set.





cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFGianlIR7qMdg1EfYRAkp5AJipL7LUDNCPGcbv5fw83Ap+hCHNAJwNnsZB
Xpewp1UiDDa+9nYV5cw3Rg==
=IVYX
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list