|
x-engine-c v0.2.13
The C engine for x-lang
|
Atom type implementation – opaque pointer wrapper. More...
Functions | |
| x_obj_t * | x_make_atom (x_obj_t *p_base, x_obj_flag_t flags, void *p) |
| x_obj_t * | x_type_atom_struct (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_type_atom_register (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_type_atom_make (x_obj_t *p_base, x_obj_t *p_args) |
Variables | |
| x_satom_t | x_type_atom_name = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .s = (x_char_t *)X_TYPE_ATOM_NAME }) |
| x_satom_t | x_type_atom_make_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_atom_make }) |
| x_satom_t | x_type_atom_struct_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_atom_struct }) |
Atom type implementation – opaque pointer wrapper.
| x_obj_t * x_make_atom | ( | x_obj_t * | p_base, |
| x_obj_flag_t | flags, | ||
| void * | p | ||
| ) |
Allocate a heap atom wrapping an opaque pointer.
Builds a stack-based argument list and delegates to x_type_atom_make.
| p_base | x_obj_t* – Base (execution context) |
| flags | x_obj_flag_t – Object flags (e.g. X_OBJ_FLAG_NONE) |
| p | void* – Raw pointer to wrap |
Type-system make callback for atom objects.
Extracts the pointer value and optional flags from p_args, then allocates a heap object via x_obj_make.
| p_base | x_obj_t* – Base (execution context) |
| p_args | x_obj_t* – (atom-value . (flags | nil)) |
Register or retrieve the atom type on the base context.
Calls x_type_struct_get with the atom name and struct builder.
| p_base | x_obj_t* – Base (execution context) |
| p_args | x_obj_t* – Unused |
Build the atom type descriptor struct.
Populates name and make callbacks for the atom type.
| p_base | x_obj_t* – Base (execution context) |
| p_args | x_obj_t* – Unused |
| x_satom_t x_type_atom_make_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_atom_make }) |
| x_satom_t x_type_atom_name = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .s = (x_char_t *)X_TYPE_ATOM_NAME }) |
| x_satom_t x_type_atom_struct_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_atom_struct }) |