runic_obj_ty_t runic_obj_ty(runic_obj_t ro);¶
The above function signature outlines the operation regarding the determination of a runic_obj_t type.
Arguments:¶
ro – Arunic_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:¶
Any of the following:
typedef enum runic_obj_ty { NODE, ATOM } runic_obj_ty_t;
Each runic_obj_t contains a tag identifiying it as either a NODE or ATOM, in addition to its children or value, respectively. That tag data is evaluated and converted to the type corresponding to it. The type is returned. In the event that a malformed or otherwise invalid runic_obj_t is used, either a -1 is returned or the program will exit. Using an invalid runic_obj_t is not encouraged.