Skip to content

Commit

Permalink
Update spec of eval_string().
Browse files Browse the repository at this point in the history
  • Loading branch information
tadd committed Jul 16, 2024
1 parent fe749f7 commit dab3353
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lisp.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,12 @@ static Value lookup(Value name)
return f;
}

Value eval_string(const char *s)
Value eval_string(const char *in)
{
return eval(parse_expr_string(s));
FILE *f = fmemopen((char *)in, strlen(in), "r");
Value v = load(f);
fclose(f);
return v;
}

static Value eval_func(Value list)
Expand Down

0 comments on commit dab3353

Please sign in to comment.