|
x-engine-c v0.2.13
The C engine for x-lang
|
Opaque pointer type – construction and registration. More...
Functions | |
| x_obj_t * | x_make_ptr (x_obj_t *p_base, x_obj_flag_t flags, void *p) |
| x_obj_t * | x_type_ptr_save (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_type_ptr_struct (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_type_ptr_register (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_type_ptr_make (x_obj_t *p_base, x_obj_t *p_args) |
Variables | |
| x_satom_t | x_type_ptr_name = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .s = (x_char_t *)X_TYPE_PTR_NAME }) |
| x_satom_t | x_type_ptr_make_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_ptr_make }) |
| x_satom_t | x_type_ptr_struct_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_ptr_struct }) |
| x_satom_t | x_type_ptr_save_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_ptr_save }) |
Opaque pointer type – construction and registration.
| x_obj_t * x_make_ptr | ( | x_obj_t * | p_base, |
| x_obj_flag_t | flags, | ||
| void * | p | ||
| ) |
Allocate a POINTER object wrapping a raw void pointer.
Packs p and flags into stack-allocated args and delegates to x_type_ptr_make() for type-system allocation.
| p_base | Base (execution context). |
| flags | Object flags (e.g. X_OBJ_FLAG_OWN). |
| p | Raw pointer to wrap. |
Type-system make handler for POINTER objects.
Extracts the raw pointer from p_args[0] and optional flags from p_args[1], then allocates via x_obj_make().
| p_base | Base (execution context). |
| p_args | Argument list: (pointer-atom [flags-atom]). |
Register (or retrieve) the POINTER type in the type alist.
Calls x_type_struct_get() with the POINTER name and struct constructor.
| p_base | Base (execution context). |
| p_args | Unused. |
Build the POINTER type struct descriptor.
Populates name and make hooks for the type system.
| p_base | Base (execution context). |
| p_args | Unused. |
Build the POINTER type struct descriptor.
| x_satom_t x_type_ptr_make_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_ptr_make }) |
| x_satom_t x_type_ptr_name = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .s = (x_char_t *)X_TYPE_PTR_NAME }) |
| x_satom_t x_type_ptr_save_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_ptr_save }) |
| x_satom_t x_type_ptr_struct_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { (x_obj_t *)&x_type_ptr_struct }) |