bool runic_node_set_right(runic_obj_t* parent, runic_obj_t child);

The above function signature outlines the operation regarding pointer assignment of the root node. The function takes the offset of child and assigns it as the right element of parent. A subsequent call to runic_node_right() with the same parent argument will return a copy of child.

Arguments:

parent – A runic_obj_t of type NODE that was returned as a result of a successful runic_alloc, runic_root, node_left or node_right operation. Meaning, this object will have an initialized base pointer and an offset greater than or equal to DEFAULT_ROOT as defined in dependencies. Using an uninitialized parent is an invalid operation and the program will likely return false.

child – A runic_obj_t that was returned as a result of a successful runic_alloc, runic_root, node_left or node_right operation. Meaning, this object will have an initialized base pointer and an offset greater than or equal to DEFAULT_ROOT as defined in dependencies. Using an uninitialized child is an invalid operation and the program will likely return false.

Returns:

On a success, child is assigned as the right element for parent, and the function returns true. On a failure, the function returns false.