x-engine-c v0.2.31
The C engine for x-lang
Loading...
Searching...
No Matches
obj.c File Reference

The interpreter object (a specialized base object) sentinel, and the interpreter's allocation of an object. More...

#include "x-obj.h"
#include "x-obj/prim.h"

Functions

x_obj_t * x_eval_alloc (x_obj_t *p_base, x_obj_t *p_args)
 

Variables

x_satom_t x_eval_obj = x_obj_set(NULL, X_OBJ_FLAG_NONE, {.s = (x_char_t *)"BASE"})
 

Detailed Description

The interpreter object (a specialized base object) sentinel, and the interpreter's allocation of an object.

Author
Jon Ruttan (jonru.nosp@m.ttan.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)

Function Documentation

◆ x_eval_alloc()

x_obj_t * x_eval_alloc ( x_obj_t *  p_base,
x_obj_t *  p_args 
)

Allocate an object: the routine in the slot vector (X_SLOT_OBJ_ALLOC) the engine allocates an object through, so a base may allocate its own way. It is x_obj_alloc() with its arguments read from the run.

Parameters
p_baseBase (execution context), or NULL to allocate without one.
p_argsArgument run: (type, flags, units).
Returns
The new object, or NULL when no base is attached and the allocation failed (see x_obj_alloc()).

Variable Documentation

◆ x_eval_obj

x_satom_t x_eval_obj = x_obj_set(NULL, X_OBJ_FLAG_NONE, {.s = (x_char_t *)"BASE"})

Static atom for the interpreter object – this project's root base object (sentinel label "BASE").