Commit 7a79e51c authored by Stefano Sabatini's avatar Stefano Sabatini

Add @code/@endcode commands to markup C code in av_tree_insert() doxy.

Originally committed as revision 18776 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 9c5a4ea2
...@@ -61,6 +61,7 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke ...@@ -61,6 +61,7 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke
* This allows the use of flat arrays, which have * This allows the use of flat arrays, which have
* lower overhead compared to many malloced elements. * lower overhead compared to many malloced elements.
* You might want to define a function like: * You might want to define a function like:
* @code
* void *tree_insert(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b), AVTreeNode **next){ * void *tree_insert(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b), AVTreeNode **next){
* if(!*next) *next= av_mallocz(av_tree_node_size); * if(!*next) *next= av_mallocz(av_tree_node_size);
* return av_tree_insert(rootp, key, cmp, next); * return av_tree_insert(rootp, key, cmp, next);
...@@ -69,7 +70,7 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke ...@@ -69,7 +70,7 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke
* if(*next) av_freep(next); * if(*next) av_freep(next);
* return av_tree_insert(rootp, key, cmp, next); * return av_tree_insert(rootp, key, cmp, next);
* } * }
* * @endcode
* @return If no insertion happened, the found element; if an insertion or * @return If no insertion happened, the found element; if an insertion or
* removal happened, then either key or NULL will be returned. * removal happened, then either key or NULL will be returned.
* Which one it is depends on the tree state and the implementation. You * Which one it is depends on the tree state and the implementation. You
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment