mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
doc: Remove latex to doxygen conversion leftovers in talloc.
Signed-off-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
69526997e5
commit
20408286e2
@ -164,11 +164,11 @@ struct user *user_zero = talloc_zero(ctx, struct user);
|
|||||||
The zero-length context is basically a context without any special semantical
|
The zero-length context is basically a context without any special semantical
|
||||||
meaning. We can use it the same way as any other context. The only difference
|
meaning. We can use it the same way as any other context. The only difference
|
||||||
is that it consists only of the meta data about the context. Therefore, it is
|
is that it consists only of the meta data about the context. Therefore, it is
|
||||||
strictly of type |TALLOC_CTX*|. It is often used in cases where we want to
|
strictly of type <code>TALLOC_CTX*</code>. It is often used in cases where we
|
||||||
aggregate several data structures under one parent (zero-length) context, such
|
want to aggregate several data structures under one parent (zero-length)
|
||||||
as a temporary context to contain memory needed within a single function that
|
context, such as a temporary context to contain memory needed within a single
|
||||||
is not interesting to the caller. Allocating on a zero-length temporary context
|
function that is not interesting to the caller. Allocating on a zero-length
|
||||||
will make clean-up of the function simpler.
|
temporary context will make clean-up of the function simpler.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
TALLOC_CTX *tmp_ctx = NULL;
|
TALLOC_CTX *tmp_ctx = NULL;
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
Generic programming in the C language is very difficult. There is no inheritance
|
Generic programming in the C language is very difficult. There is no inheritance
|
||||||
nor templates known from object oriented languages. There is no dynamic type
|
nor templates known from object oriented languages. There is no dynamic type
|
||||||
system. Therefore, generic programming in this language is usually done by
|
system. Therefore, generic programming in this language is usually done by
|
||||||
type-casting a variable to |void*| and transferring it through a generic function
|
type-casting a variable to <code>void*</code> and transferring it through
|
||||||
to a specialized callback as illustrated on the next listing.
|
a generic function to a specialized callback as illustrated on the next listing.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
void generic_function(callback_fn cb, void *pvt)
|
void generic_function(callback_fn cb, void *pvt)
|
||||||
@ -45,7 +45,7 @@ Although the name of the context can be set to any arbitrary string, the best
|
|||||||
way of using it to simulate the dynamic type system is to set it directly to the
|
way of using it to simulate the dynamic type system is to set it directly to the
|
||||||
type of the variable.
|
type of the variable.
|
||||||
|
|
||||||
It is recommended to use one of |talloc()| and |talloc_array()| (or its
|
It is recommended to use one of talloc() and talloc_array() (or its
|
||||||
variants) to create the context as they set its name to the name of the
|
variants) to create the context as they set its name to the name of the
|
||||||
given type automatically.
|
given type automatically.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user