[PATCH 1/1] Add talloc_memdup_type

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Jul 6 07:51:58 GMT 2008


On Fri, Jul 04, 2008 at 10:57:00AM +0100, Amin Azez wrote:
> talloc_memdup is all very fine, but is useless for cloning structs
> that are type-checked using talloc_get_type.
> 
> talloc_memdup_type is like talloc_memdup except it preserves the name
> on the new allocation

You might also want to look at the talloc_set_destructor
macro and the talloc_size function. Using those tricks way
the talloc_dup might become easier :-)

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080706/7eae2840/attachment.bin


More information about the samba-technical mailing list