From 5ed074715a7d63b803d5eaff3144a48304201df3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 Aug 2006 16:55:51 +0000 Subject: r17886: add talloc_ptrtype() and talloc_array_ptrtype(), see the manpage what they do:-) metze (This used to be commit bfca83c91e47e9017474809cd7bc8b2e6e20416a) --- source4/lib/talloc/talloc.3.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source4/lib/talloc/talloc.3.xml') diff --git a/source4/lib/talloc/talloc.3.xml b/source4/lib/talloc/talloc.3.xml index ef032f8426..952083a805 100644 --- a/source4/lib/talloc/talloc.3.xml +++ b/source4/lib/talloc/talloc.3.xml @@ -97,6 +97,15 @@ type checking. + (typeof(ptr)) talloc_ptrtype(const void *ctx, ptr); + + The talloc_ptrtype() macro should be used when you have a pointer and + want to allocate memory to point at with this pointer. When compiling + with gcc >= 3 it is typesafe. Note this is a wrapper of talloc_size() + and talloc_get_name() will return the current location in the source file. + and not the type. + + int talloc_free(void *ptr); The talloc_free() function frees a piece of talloc memory, and @@ -551,6 +560,15 @@ if (ptr) memcpy(ptr, p, strlen(p)+1); size instead of a type. + (typeof(ptr)) talloc_array_ptrtype(const void *ctx, ptr, uint_t count); + + The talloc_ptrtype() macro should be used when you have a pointer to an array + and want to allocate memory of an array to point at with this pointer. When compiling + with gcc >= 3 it is typesafe. Note this is a wrapper of talloc_array_size() + and talloc_get_name() will return the current location in the source file. + and not the type. + + void *talloc_realloc_fn(const void *ctx, void *ptr, size_t size) This is a non-macro version of talloc_realloc(), which is useful -- cgit