/builddir/build/BUILD/gru-0.1.0/src/collection/gru_node.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "common/gru_portable.h"
Go to the source code of this file.
Define Documentation
#define gru_node_get_data |
( |
type, |
|
|
node |
|
) |
(*(gru_node_get_data_ptr(type, node))) |
#define gru_node_get_data_ptr |
( |
type, |
|
|
node |
|
) |
(type *) node->data |
Typedef Documentation
Function Documentation
gru_export void gru_node_destroy |
( |
gru_node_t ** |
node |
) |
|
Destroys a node and sets is address to NULL.
- Parameters:
-
| node | a pointer to the node pointer to destroy |
gru_export gru_node_t* gru_node_new |
( |
const void * |
ptr |
) |
|
Creates a new node.
- Parameters:
-
- Returns:
- a new node
gru_export void gru_node_reset |
( |
gru_node_t *gru_restrict |
node |
) |
|
Reset the pointers for the node and unassign the next and previous pointers.
- Parameters:
-
Sets the next node for a given node.
- Parameters:
-
| node | the node to set |
| next | the node to be set as the next to the node |
gru_export void gru_node_set_previous |
( |
gru_node_t *gru_restrict |
node, |
|
|
gru_node_t *gru_restrict |
previous | |
|
) |
| | |
Sets the previous node for a given node.
- Parameters:
-
| node | the node to set |
| previous | the node to be set as a previous to the node |
gru_export void gru_node_unlink |
( |
gru_node_t *gru_restrict |
node |
) |
|
Unlink a node from it's previous and next node and resets it.
- Parameters:
-