Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct map_internal {

typedef enum { RB_RED = 0, RB_BLACK } map_color_t;

/**
/*
* Get parent of node
* @node: pointer to the rb node
*
Expand All @@ -29,7 +29,7 @@ static inline map_node_t *rb_parent(const map_node_t *node)
return (map_node_t *) (node->parent_color & ~1LU);
}

/**
/*
* Get color of node
* @node: pointer to the rb node
*
Expand All @@ -40,7 +40,7 @@ static inline map_color_t rb_color(const map_node_t *node)
return (map_color_t) (node->parent_color & 1LU);
}

/**
/*
* Set parent of node
* @node: pointer to the rb node
* @parent: pointer to the new parent node
Expand All @@ -50,7 +50,7 @@ static inline void rb_set_parent(map_node_t *node, map_node_t *parent)
node->parent_color = (unsigned long) parent | (node->parent_color & 1LU);
}

/**
/*
* Set color of node
* @node: pointer to the rb node
* @color: new color of the node
Expand All @@ -60,7 +60,7 @@ static inline void rb_set_color(map_node_t *node, map_color_t color)
node->parent_color = (node->parent_color & ~1LU) | color;
}

/**
/*
* Set parent and color of node
* @node: pointer to the rb node
* @parent: pointer to the new parent node
Expand All @@ -73,7 +73,7 @@ static inline void rb_set_parent_color(map_node_t *node,
node->parent_color = (unsigned long) parent | color;
}

/**
/*
* Check if node is red
* @node: Node to check
*
Expand Down
2 changes: 1 addition & 1 deletion src/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static inline int map_cmp_uint(const void *arg0, const void *arg1)
return (*a < *b) ? _CMP_LESS : (*a > *b) ? _CMP_GREATER : _CMP_EQUAL;
}

/**
/*
* Store the key, data, and values of each element in the tree.
* This is the main basis of the entire tree aside from the root struct.
*
Expand Down