svn commit: samba r2717 - in branches/SAMBA_4_0: .

tridge at samba.org tridge at samba.org
Tue Sep 28 11:08:44 GMT 2004


Author: tridge
Date: 2004-09-28 11:08:43 +0000 (Tue, 28 Sep 2004)
New Revision: 2717

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0&rev=2717&nolog=1

Log:
added talloc_p() docs

Modified:
   branches/SAMBA_4_0/talloc_guide.txt


Changeset:
Modified: branches/SAMBA_4_0/talloc_guide.txt
===================================================================
--- branches/SAMBA_4_0/talloc_guide.txt	2004-09-28 11:04:55 UTC (rev 2716)
+++ branches/SAMBA_4_0/talloc_guide.txt	2004-09-28 11:08:43 UTC (rev 2717)
@@ -65,6 +65,19 @@
 
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+void *talloc_p(const void *context, type);
+
+The talloc_p() macro is the equivalent of 
+
+  (type *)talloc(ctx, sizeof(type))
+
+You should use it in preference to talloc() whenever possible, as it
+provides additional type safety. It also automatically calls the
+talloc_set_name_const() function with the name being a string holding
+the name of the type.
+
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 int talloc_free(void *ptr);
 
 The talloc_free() function frees a piece of talloc memory, and all its



More information about the samba-cvs mailing list