Reduct  v4.1.3-1-gd06c383
A functional and immutable language.
Loading...
Searching...
No Matches
core.h File Reference

Core definitions and structures. More...

#include <reduct/arena.h>
#include <reduct/atom.h>
#include <reduct/defs.h>
#include <reduct/error.h>
#include <reduct/eval.h>
#include <reduct/gc.h>
#include <reduct/item.h>
#include <reduct/list.h>
#include <reduct/module.h>
#include <reduct/native.h>
#include <reduct/schema.h>
#include <reduct/scratch.h>
#include <reduct/task.h>
#include <assert.h>
#include <stdatomic.h>
#include <stdlib.h>
Include dependency graph for core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  reduct_global_t
 Global state structure. More...
 
struct  reduct_t
 Per-thread state structure. More...
 

Macros

#define REDUCT_SCHEMA_INITIAL   4
 Initial size of the schema array.
 
#define REDUCT_SCHEMA_GROWTH   2
 Growth factor of the schema array.
 
#define REDUCT_CONSTANTS_MAX   8
 Maximum amount of predefined constants.
 
#define REDUCT_SCRATCH_INITIAL   128
 Initial scratch buffer size.
 
#define REDUCT_SCRATCH_MAX   16
 The maximum number of scratch buffers.
 

Functions

REDUCT_API reduct_treduct_new (void)
 Create a new Reduct environment.
 
REDUCT_API void reduct_free (reduct_t *reduct)
 Free the Reduct structure.
 
REDUCT_API void reduct_userdata_set (reduct_t *reduct, void *userdata)
 Set the user data pointer for the Reduct structure.
 
REDUCT_API void * reduct_userdata_get (reduct_t *reduct)
 Get the user data pointer from the Reduct structure.
 
REDUCT_API void reduct_args_set (reduct_t *reduct, int argc, char **argv)
 Set the command line arguments for the Reduct structure.
 
static REDUCT_ALWAYS_INLINE uint32_t reduct_hash (const char *str, size_t len)
 Hash a string.
 

Detailed Description

Core definitions and structures.

Definition in file core.h.