MCPcopy Create free account
hub / github.com/codr7/hacktical-c / hc_dsl_init

Function hc_dsl_init

dsl/dsl.c:56–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void hc_dsl_init(struct hc_dsl *dsl, struct hc_malloc *malloc) {
57 hc_set_init(&dsl->env, malloc, sizeof(struct env_item), env_cmp);
58 dsl->env.key = env_key;
59 dsl->out = hc_stdout();
60
61 hc_vm_init(&dsl->vm, &hc_malloc_default);
62 hc_dsl_set_fun(dsl, "print", lib_print);
63 hc_dsl_set_fun(dsl, "upcase", lib_upcase);
64}
65
66static void deinit_env(struct hc_set *env) {
67 hc_vector_do(&env->items, _it) {

Callers 2

eval_testsFunction · 0.85
dsl_benchmarksFunction · 0.85

Calls 4

hc_set_initFunction · 0.85
hc_stdoutFunction · 0.85
hc_vm_initFunction · 0.85
hc_dsl_set_funFunction · 0.85

Tested by 1

eval_testsFunction · 0.68