bool runic_set_root(runic_t* r, runic_obj_t ro);¶
The above function signature outlines the operation regarding pointer assignment of the root node. The function takes the offset of ro and assigns it as the root object of r. A subsequent call to runic_root() with the same r argument will return a copy of ro.
Arguments:¶
r – A
runic_tobject that was returned as a result of a successful open operation. Attempting to use any invalid or malformed object is an invalid operation. The program will almost certainly returnfalse. Attempting to assign the root pointer with such an object is not encouraged.ro – A
runic_obj_tthat was returned as a result of a successful runic_alloc, runic_root, node_left or node_right operation. Meaning, this object will have an initializedbasepointer and anoffsetgreater than or equal toDEFAULT_ROOTas defined in dependencies. Using an uninitializedrois an invalid operation and the program will likely return an invalidrunic_obj_tas described inrunic_root().
Returns:¶
Following a successful assignment of ro as the root object of r, the function will return true. On an unsuccessful assignment (e.g.: invalid object use), the function will return false.