diff options
author | Pavel Březina <pbrezina@redhat.com> | 2012-04-16 12:44:08 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-04-18 10:27:15 +0200 |
commit | b233173f85a902d8b037d7a9ac8e069bd3ae1101 (patch) | |
tree | ecb9a8dd9dc91657980e8592a04e8ca4b2fb0bf8 /lib/talloc | |
parent | c69c07efeccffec9848e6040b7934ee866b91e7e (diff) | |
download | samba-b233173f85a902d8b037d7a9ac8e069bd3ae1101.tar.gz samba-b233173f85a902d8b037d7a9ac8e069bd3ae1101.tar.bz2 samba-b233173f85a902d8b037d7a9ac8e069bd3ae1101.zip |
Talloc doc: talloc_strdup_append()
The destination string is reallocated instead of duplicating the result.
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index 96c7e2467c..85c8ce9d6d 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -1,16 +1,16 @@ #ifndef _TALLOC_H_ #define _TALLOC_H_ -/* +/* Unix SMB/CIFS implementation. Samba temporary memory allocation functions Copyright (C) Andrew Tridgell 2004-2005 Copyright (C) Stefan Metzmacher 2006 - + ** NOTE! The following LGPL license applies to the talloc ** library. This does NOT imply that all of Samba is released ** under the LGPL - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -1290,7 +1290,20 @@ void *talloc_realloc_fn(const void *context, void *ptr, size_t size); char *talloc_strdup(const void *t, const char *p); /** - * @brief Append a string to given string and duplicate the result. + * @brief Append a string to given string. + * + * The destination string is reallocated to take strlen(s) + strlen(a) + 1 + * characters. + * + * The destination string is reallocated to take + * <code>strlen(s) + strlen(a, n) + 1</code> characters. + * + * This functions sets the name of the new pointer to the new + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode * * @param[in] s The destination to append to. * @@ -1299,6 +1312,7 @@ char *talloc_strdup(const void *t, const char *p); * @return The duplicated string, NULL on error. * * @see talloc_strdup() + * @see talloc_strdup_append_buffer() */ char *talloc_strdup_append(char *s, const char *a); |