From 1429ed54f14055a1a9399452cb6cfc94f9451cf5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 3 Oct 2004 06:39:19 +0000 Subject: r2792: got rid of talloc_ldb_alloc() and instead created talloc_realloc_fn(), so talloc now doesn't contain any ldb specific functions. allow NULL to be passed to a couple more talloc() functions (This used to be commit 1246f80d806fb5f63cfbf3879de6d546384552a8) --- talloc_guide.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'talloc_guide.txt') diff --git a/talloc_guide.txt b/talloc_guide.txt index 7742ade623..484b4c8228 100644 --- a/talloc_guide.txt +++ b/talloc_guide.txt @@ -458,3 +458,13 @@ The talloc_realloc_p() macro is equivalent to: except that it provides integer overflow protection for the multiply, returning NULL if the multiply overflows. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +void *talloc_realloc_fn(const void *ctx, void *ptr, size_t size); + +This is a non-macro version of talloc_realloc(), which is useful +as libraries sometimes want a ralloc function pointer. A realloc() +implementation encapsulates the functionality of malloc(), free() and +realloc() in one call, which is why it is useful to be able to pass +around a single function pointer. + -- cgit