From 47107b2cdea7c58c337639f6d1aaab94390bf0f6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 14 Sep 2007 17:40:58 +0000 Subject: r25164: Add talloc_asprintf_append_buffer() and the docs for it. Jeremy. (This used to be commit 2243a73d650319208aebbbaf65dfba2a508a7c10) --- source3/lib/talloc/talloc_guide.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'source3/lib/talloc/talloc_guide.txt') diff --git a/source3/lib/talloc/talloc_guide.txt b/source3/lib/talloc/talloc_guide.txt index c4634ae19a..18663b370d 100644 --- a/source3/lib/talloc/talloc_guide.txt +++ b/source3/lib/talloc/talloc_guide.txt @@ -568,8 +568,23 @@ string. This is equivalent to: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- char *talloc_asprintf_append(char *s, const char *fmt, ...); +The talloc_asprintf_append() function appends the given formatted +string to the given string. +Use this varient when the string in the current talloc buffer may +have been truncated in length. + +This functions sets the name of the new pointer to the new +string. This is equivalent to: + talloc_set_name_const(ptr, ptr) + + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...); + The talloc_asprintf_append() function appends the given formatted -string to the given string. +string to the end of the currently allocated talloc buffer. +Use this varient when the string in the current talloc buffer has +not been changed. This functions sets the name of the new pointer to the new string. This is equivalent to: @@ -577,7 +592,7 @@ string. This is equivalent to: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -(type *)talloc_array(const void *ctx, type, uint_t count); +((type *)talloc_array(const void *ctx, type, uint_t count); The talloc_array() macro is equivalent to: -- cgit