diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-03-22 06:00:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:10 -0500 |
commit | da5349dede9d4add974da3078437a8513a39bbae (patch) | |
tree | bc4a52be7d9a5a35636738f5ee0caee055852f40 /source4 | |
parent | 689a803ac7600c1d8bff5e33cce1c098a332c02a (diff) | |
download | samba-da5349dede9d4add974da3078437a8513a39bbae.tar.gz samba-da5349dede9d4add974da3078437a8513a39bbae.tar.xz samba-da5349dede9d4add974da3078437a8513a39bbae.zip |
r5939: improve talloc_realloc() docs after feedback from lifeless
(This used to be commit 301cbb0d12919f83d6b735c2e23b49fb49d5394d)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/talloc/talloc_guide.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/talloc/talloc_guide.txt b/source4/lib/talloc/talloc_guide.txt index eae6c5e5647..4ab0f8eacc3 100644 --- a/source4/lib/talloc/talloc_guide.txt +++ b/source4/lib/talloc/talloc_guide.txt @@ -267,9 +267,13 @@ particularly useful for creating a new temporary working context. (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 |