x-engine-c v0.2.13
The C engine for x-lang
Loading...
Searching...
No Matches
x_datum_union Union Reference

#include <x-obj.h>

Data Fields

x_obj_tp
 
x_fn_t fn
 
x_int_t i
 
x_char_t c
 
x_char_ts
 
void * v
 

Detailed Description

The fundamental datum – one unit of an object's metadata or data.

A datum is reinterpreted through the member matching its content; the x_obj(), x_fn(), x_int(), x_char(), x_str() and x_ptr() macros select the appropriate member.

Note
Datum and unit name this same cell from two angles, not two granularities: "unit" is the layout/count sense (X_OBJ_UNITS_ATOM, x_obj_units(), sizing in x_obj_alloc()), "datum" the content sense (the tagged-union interpretation read through the accessors above).

Field Documentation

◆ c

x_char_t x_datum_union::c

Character.

◆ fn

x_fn_t x_datum_union::fn

Primitive function pointer.

◆ i

x_int_t x_datum_union::i

Signed integer (e.g. flags slot).

◆ p

x_obj_t* x_datum_union::p

Object pointer (e.g. type slot, pair element).

◆ s

x_char_t* x_datum_union::s

Null-terminated string.

◆ v

void* x_datum_union::v

Opaque pointer.


The documentation for this union was generated from the following file: