blob: 406a79cc64606da50ec164f49f4c71225e6af144 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef SAND_STATE_H
#define SAND_STATE_H
// This module defines the evaluator state. This is the "world" in Sand.
// Multiple evaluator states can coexist as they are totally separate.
#include <stddef.h>
typedef void (* SandPrintHandler)(const char *message, size_t length);
typedef struct {
SandPrintHandler print_handler;
} SandConfig;
// This data structure should be treated as entirely opaque by consuming code.
typedef struct {
SandConfig config;
} SandState;
SandState sand_create_state(SandConfig config);
void sand_destroy_state(SandState *);
#endif
|