Variadic helpers for extracting arguments from x-lang arg lists.
More...
Variadic helpers for extracting arguments from x-lang arg lists.
◆ __attribute__()
| static void __attribute__ |
( |
(unused) |
| ) |
|
|
static |
Unpack count elements from an args list into output pointers.
NULL pointers skip that position (like _ in pattern matching).
x_args(p_base,
p_args, 3, NULL, &a, &b);
static void x_obj_t * p_args
Definition x-prim.h:56
- Parameters
-
| p_base | Base/execution context (for the improper-spine raise). |
| p_args | Argument list (pair chain). |
| count | Number of positions to unpack. |
| ... | Pointers to x_obj_t* slots (or NULL to skip). |
- Note
- Walking off the proper prefix of an IMPROPER list used to read the tail atom's value word as a pair pointer (#487). The nil test below ends a proper list; x_eval_spine_guard raises on the atom a dotted tail ends with, which is the same catchable error an applicative already gave for the same call shape.
Unpack and evaluate count elements from an args list.
NULL pointers skip that position without evaluating.
x_eargs(p_base,
p_args, 3, NULL, &a, &b);
- Parameters
-
| p_base | Base/execution context. |
| p_args | Argument list (pair chain). |
| count | Number of positions to unpack. |
| ... | Pointers to x_obj_t* slots (or NULL to skip). |
◆ for()
◆ va_end()
◆ va_start()
◆ x_heap_root_pop()
◆ x_heap_root_push() [1/2]
◆ x_heap_root_push() [2/2]
◆ count
◆ held
◆ p_args
◆ p_cell
| x_obj_t** p_cell = x_heap_root_slot(p_base) |
◆ roots
Initial value:= {
{ NULL }, { NULL }),
{ NULL }, { NULL })
}
@ X_OBJ_FLAG_NONE
Definition x-obj.h:129
#define x_obj_set(T, F,...)
Definition x-obj.h:342
x_satom_t x_type_pair_obj
Definition x-obj.c:32