svn commit: samba r5939 - in branches/SAMBA_4_0/source/lib/talloc: .
tridge at samba.org
tridge at samba.org
Tue Mar 22 06:00:51 GMT 2005
Author: tridge
Date: 2005-03-22 06:00:51 +0000 (Tue, 22 Mar 2005)
New Revision: 5939
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5939
Log:
improve talloc_realloc() docs after feedback from lifeless
Modified:
branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt
Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt 2005-03-22 05:51:41 UTC (rev 5938)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt 2005-03-22 06:00:51 UTC (rev 5939)
@@ -267,9 +267,13 @@
(type *)talloc_realloc(const void *context, void *ptr, type, count);
The talloc_realloc() macro changes the size of a talloc
-pointer. It has the following equivalences:
+pointer. The "count" argument is the number of elements of type "type"
+that you want the resulting pointer to hold.
+talloc_realloc() has the following equivalences:
+
talloc_realloc(context, NULL, type, 1) ==> talloc(context, type);
+ talloc_realloc(context, NULL, type, N) ==> talloc_array(context, type, N);
talloc_realloc(context, ptr, type, 0) ==> talloc_free(ptr);
The "context" argument is only used if "ptr" is not NULL, otherwise it
More information about the samba-cvs
mailing list