|
x-engine-c v0.2.13
The C engine for x-lang
|
Navigate the metadata section (profile + hooks) of the base tree. More...
Macros | |
| #define | x_base_field_meta_group(X) x_restobj(x_restobj(x_base(X))) |
| #define | x_base_field_profile(X) x_firstobj(x_firstobj(x_base_field_meta_group(X))) |
| #define | x_base_field_profile_allocs(X) x_firstobj(x_base_field_profile(X)) |
| #define | x_base_field_hooks(X) x_restobj(x_firstobj(x_base_field_meta_group(X))) |
| #define | x_base_field_hook_type_name(X) x_firstobj(x_base_field_hooks(X)) |
| #define | x_base_field_hook_units(X) x_firstobj(x_restobj(x_base_field_hooks(X))) |
| #define | x_base_field_hook_length(X) x_firstobj(x_restobj(x_restobj(x_base_field_hooks(X)))) |
| #define | x_base_field_hook_error(X) x_firstobj(x_restobj(x_restobj(x_restobj(x_base_field_hooks(X))))) |
Navigate the metadata section (profile + hooks) of the base tree.
| #define x_base_field_hook_error | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_restobj(x_base_field_hooks(X))))) |
Get the error hook field. Value: atom with void pointer to function.
void (*)(x_obj_t *p_base, x_char_t *message, x_obj_t *p_obj). It is dispatched via a cast from x_firstptr(), not x_atomfn(). | #define x_base_field_hook_length | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_base_field_hooks(X)))) |
Get the length hook field. Value: atom with x_fn_t function pointer. Same calling convention as type_name. Must return an integer atom with the logical length, or NULL.
| #define x_base_field_hook_type_name | ( | X | ) | x_firstobj(x_base_field_hooks(X)) |
Get the type_name hook field. Value: atom with x_fn_t function pointer. Signature: x_obj_t *(*)(x_obj_t *p_base, x_obj_t *p_args) – p_args is a pair list whose first element is the object to name. Must return a type name atom (string data), or NULL.
| #define x_base_field_hook_units | ( | X | ) | x_firstobj(x_restobj(x_base_field_hooks(X))) |
Get the units hook field. Value: atom with x_fn_t function pointer. Same calling convention as type_name. Must return an integer atom with the number of data units, or NULL.
| #define x_base_field_hooks | ( | X | ) | x_restobj(x_firstobj(x_base_field_meta_group(X))) |
Get the hooks list (type-name, units, length, error).
Hooks are only dispatched for objects whose type pointer is NOT one of the built-in static types (x_type_atom_obj, x_type_pair_obj). Dispatch priority: check static type (pointer identity, O(1)), then call the hook if set, then fall back to NULL.
Get the meta group list (profile+hooks, heap, alloc; the tail past alloc is the embedding layer's extension point).
| #define x_base_field_profile | ( | X | ) | x_firstobj(x_firstobj(x_base_field_meta_group(X))) |
Get the profile pair (counters).
| #define x_base_field_profile_allocs | ( | X | ) | x_firstobj(x_base_field_profile(X)) |
Get the allocation counter field. Value: integer atom, incremented by x_obj_alloc().