1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

r4793: minor doc updates

This commit is contained in:
Andrew Tridgell 2005-01-17 02:52:10 +00:00 committed by Gerald (Jerry) Carter
parent 4a963e3b7a
commit ad1af519eb

View File

@ -32,10 +32,9 @@ If you think about this, then what this effectively gives you is an
n-ary tree, where you can free any part of the tree with n-ary tree, where you can free any part of the tree with
talloc_free(). talloc_free().
If you find this confusing, then I suggest you run the LOCAL-TALLOC If you find this confusing, then I suggest you run the testsuite to
smbtorture test to watch talloc in action. You may also like to add watch talloc in action. You may also like to add your own tests to
your own tests to source/lib/talloc/testsuite.c to clarify how some testsuite.c to clarify how some particular situation is handled.
particular situation is handled.
Performance Performance
@ -74,6 +73,7 @@ well. Alternatively you can free just the child.
The context argument to talloc() can be NULL, in which case a new top The context argument to talloc() can be NULL, in which case a new top
level context is created. level context is created.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
void *talloc_size(const void *context, size_t size); void *talloc_size(const void *context, size_t size);
@ -81,12 +81,6 @@ The function talloc_size() should be used when you don't have a
convenient type to pass to talloc(). Unlike talloc(), it is not type convenient type to pass to talloc(). Unlike talloc(), it is not type
safe (as it returns a void *), so you are on your own for type checking. safe (as it returns a void *), so you are on your own for type checking.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
void *talloc_p(const void *context, type);
talloc_p() is a alias for talloc(). It only exists as a backwards
compatibity macro for code from the bad old days when talloc() was not
type safe.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
int talloc_free(void *ptr); int talloc_free(void *ptr);
@ -491,10 +485,13 @@ The talloc_array() macro is equivalent to:
except that it provides integer overflow protection for the multiply, except that it provides integer overflow protection for the multiply,
returning NULL if the multiply overflows. returning NULL if the multiply overflows.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
void *talloc_array_size(const void *ctx, size_t size, uint_t count); void *talloc_array_size(const void *ctx, size_t size, uint_t count);
The talloc_array_size() function is useful when the type is not known The talloc_array_size() function is useful when the type is not
known. It operates in the same way as talloc_array(), but takes a size
instead of a type.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -506,6 +503,7 @@ implementation encapsulates the functionality of malloc(), free() and
realloc() in one call, which is why it is useful to be able to pass realloc() in one call, which is why it is useful to be able to pass
around a single function pointer. around a single function pointer.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
void *talloc_autofree_context(void); void *talloc_autofree_context(void);
@ -540,7 +538,3 @@ talloc_get_type() to do type checking on void* pointers.
It is equivalent to this: It is equivalent to this:
talloc_set_name_const(ptr, #type) talloc_set_name_const(ptr, #type)