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 – 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 ro is an invalid operation and the program will likely return an invalid runic_obj_t as described in runic_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.