diff options
| author | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2026-01-18 17:44:10 +0100 |
|---|---|---|
| committer | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2026-01-18 17:44:10 +0100 |
| commit | 07cd615c7e1cafccd6d46b3eb68d413f2a2dd9a5 (patch) | |
| tree | 540292fc4029265628ea7e4d2d750c21c267a85b /lisp.c | |
| parent | a2ab90cfb9e364a3de7157b2ea2905e4c944583d (diff) | |
start writing psql module, start writing exercise 1 with that module, small header file changes as needed for module programming
Diffstat (limited to 'lisp.c')
| -rw-r--r-- | lisp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -26,14 +26,14 @@ value *make_double(double d) { value *make_symbol(const char *s) { value *val = malloc(sizeof(value)); val->type = VT_SYMBOL; - val->as.sym = s; + val->as.sym = strdup(s); return val; } value *make_string(const char *s) { value *val = malloc(sizeof(value)); val->type = VT_STRING; - val->as.str = s; + val->as.str = strdup(s); return val; } @@ -518,7 +518,7 @@ value *procedure_load_module(env *e, value *args) { env_define(e, exports[i].name, exports[i].v); } - return make_nil(); + return make_int(1); } int is_integer(double x) { |
