Archived
1
0
Fork 0
This repository has been archived on 2023-11-10. You can view files and clone it, but cannot push or open issues or pull requests.
lispy/lval/error.c

11 lines
No EOL
223 B
C

#include <stdlib.h>
#include <string.h>
#include "error.h"
lval* lval_err(char* m) {
lval* v = (lval *) malloc(sizeof(lval));
v->type = LVAL_ERR;
v->err = (char *) malloc(strlen(m) + 1);
strcpy(v->err, m);
return v;
}