blob: a233a09815edcb3d369baaf898e6b6bdd331c249 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef ENV_H
#define ENV_H
// #include "value.h"
typedef struct value * _value_t;
typedef struct env * env_t;
#define ENV_EMPTY NULL
typedef void (*env_destroy_func)(char *key, _value_t value);
env_t env_create(env_t parent, env_destroy_func destroy_func);
void env_destroy(env_t env);
int env_insert(env_t env, char *key, _value_t data,
char **prevkey, _value_t *prevdata);
int env_query(env_t env, char *key, _value_t *data);
env_t env_copy(env_t env);
env_t env_parent(env_t env);
#endif
|