diff options
author | Volker Lendecke <vl@samba.org> | 2009-03-21 23:57:14 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-03-21 23:57:24 +0100 |
commit | 59dff5745528a3efe585cdeb03e2bedd6b2e404a (patch) | |
tree | 2036543dd6dcbfaf3038912f11d267fa5039b15f /lib/talloc | |
parent | 986c2e01cca0be993f1e52d3a27819f4044bfe4b (diff) | |
download | samba-59dff5745528a3efe585cdeb03e2bedd6b2e404a.tar.gz samba-59dff5745528a3efe585cdeb03e2bedd6b2e404a.tar.bz2 samba-59dff5745528a3efe585cdeb03e2bedd6b2e404a.zip |
Document talloc_zero_array()
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index 9806bdd3ad..ae488baf32 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -426,6 +426,22 @@ typedef void TALLOC_CTX; #define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__) +/** + * \def talloc_zero_array(ctx, type, count) + * \brief Allocate a 0-initialized array + * \param ctx The talloc context to hang the result off + * \param type The type that we want to allocate + * \param count The number of "type" elements you want to allocate + * \return The allocated result, properly cast to "type *" + * \ingroup talloc_array + * + * The talloc_zero_array() macro is equivalent to: + * + * \code + * ptr = talloc_array(ctx, type, count); + * if (ptr) memset(ptr, sizeof(type) * count); + * \endcode + */ #define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type) /** |