|
x-engine-c v0.2.13
The C engine for x-lang
|
Atom type – opaque pointer wrapper for the x-lang type system. More...
#include "x-type.h"Go to the source code of this file.
Macros | |
| #define | X_TYPE_ATOM_NAME "ATOM" |
| #define | x_obj_type_isatom(B, X) x_obj_is_type((B), (X), X_TYPE_ATOM_NAME) |
| #define | x_atomval(X) x_atomptr(X) |
| #define | x_mkatom(B, P) x_make_atom((B), X_OBJ_FLAG_NONE, (P)) |
| #define | x_mkfatom(B, F, P) x_make_atom((B), (F), (P)) |
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_register (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_type_atom_struct (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) |
| x_obj_t * | x_type_atom_call (x_obj_t *p_base, x_obj_t *p_args) |
Variables | |
| x_satom_t | x_type_atom_name |
| x_satom_t | x_type_atom_make_prim |
| x_satom_t | x_type_atom_call_prim |
| x_satom_t | x_type_atom_struct_prim |
Atom type – opaque pointer wrapper for the x-lang type system.
| #define x_atomval | ( | X | ) | x_atomptr(X) |
Extract the raw pointer from an atom object.
| #define x_mkatom | ( | B, | |
| P | |||
| ) | x_make_atom((B), X_OBJ_FLAG_NONE, (P)) |
Make an atom with default flags.
| #define x_mkfatom | ( | B, | |
| F, | |||
| P | |||
| ) | x_make_atom((B), (F), (P)) |
Make an atom with explicit flags F.
| #define x_obj_type_isatom | ( | B, | |
| X | |||
| ) | x_obj_is_type((B), (X), X_TYPE_ATOM_NAME) |
Test whether object X is an atom on base B.
| #define X_TYPE_ATOM_NAME "ATOM" |
Type-system name string
| x_obj_t * x_make_atom | ( | x_obj_t * | p_base, |
| x_obj_flag_t | flags, | ||
| void * | p | ||
| ) |
Allocate a heap atom wrapping pointer 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 call callback for atom.
Type-system make callback for atom.
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 struct on p_base.
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.
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_call_prim |
| x_satom_t x_type_atom_make_prim |
|
extern |
| x_satom_t x_type_atom_struct_prim |