Started to clean comments
This commit is contained in:
parent
9d095a93a8
commit
f88901058f
|
@ -3,32 +3,37 @@
|
||||||
|
|
||||||
#include <gint/defs/types.h>
|
#include <gint/defs/types.h>
|
||||||
|
|
||||||
/* elem_t: Element struct for linked lists
|
/**
|
||||||
This struct is the base for storing data.
|
* @brief Element struct for linked lists.
|
||||||
|
* This struct is the base for storing data.
|
||||||
@data Raw pointer to any type of data
|
*
|
||||||
@prev Pointer to the prev element in the linked list
|
* @param data Raw pointer to any type of data
|
||||||
@next Pointer to the next element in the linked list */
|
* @param prev Pointer to the prev element in the linked list
|
||||||
|
* @param next Pointer to the next element in the linked list
|
||||||
|
*/
|
||||||
typedef struct elem_t {
|
typedef struct elem_t {
|
||||||
void *data;
|
void *data;
|
||||||
struct elem_t *prev;
|
struct elem_t *prev;
|
||||||
struct elem_t *next;
|
struct elem_t *next;
|
||||||
} elem_t;
|
} elem_t;
|
||||||
|
|
||||||
/* deleter_t: A type for deleters used during the destruction of data stored in elements
|
/**
|
||||||
|
* @brief A type for deleters used during the destruction of data stored in elements.
|
||||||
During the initialisation of linked lists you can pass in argument a deleter.
|
*
|
||||||
It is used during the destruction of an element.
|
* During the initialisation of linked lists you can pass in argument a deleter.
|
||||||
You can pass NULL to the initialisation to use the default deleter (kfree(elem->data)).
|
* It is used during the destruction of an element.
|
||||||
Your deleter_t function declaration must look like this :
|
* You can pass NULL to the initialisation to use the default deleter (kfree(elem->data)).
|
||||||
|
* Your deleter_t function declaration must look like this :
|
||||||
void name_of_your_deleter(void *data);
|
*
|
||||||
|
* @example void name_of_your_deleter(void *data);
|
||||||
Then do what you need to destroy your data (don't forget to free the data itself...).
|
*
|
||||||
You should always define your function with "inline" if it's no too long. */
|
* Then do what you need to destroy your data (don't forget to free the data itself...).
|
||||||
|
* You should always define your function with "inline" if it's no too long.
|
||||||
|
*/
|
||||||
typedef void (*deleter_t)(void *data);
|
typedef void (*deleter_t)(void *data);
|
||||||
|
|
||||||
/* condition_t: A type for condition used for function like linked_list_remove_if
|
/**
|
||||||
|
* @brief A type for condition used for function like linked_list_remove_if
|
||||||
|
|
||||||
For function like linked_list_remove_if you need a condition.
|
For function like linked_list_remove_if you need a condition.
|
||||||
It have two argument which are "elem_t *" and "va_list", that is because it passes the element on the actual index
|
It have two argument which are "elem_t *" and "va_list", that is because it passes the element on the actual index
|
||||||
|
|
Loading…
Reference in New Issue