Add defun without evaluation
This commit is contained in:
11
src/memory.c
11
src/memory.c
@@ -49,7 +49,7 @@ struct ucl_object *ucl_error_create(const char *error)
|
||||
}
|
||||
|
||||
|
||||
struct ucl_object *ucl_builtin_create(ucl_builtin builtin)
|
||||
struct ucl_object *ucl_builtin_create(ucl_lisp builtin)
|
||||
{
|
||||
struct ucl_object* obj = ucl_object_alloc();
|
||||
obj->type = UCL_TYPE_BUILTIN;
|
||||
@@ -57,6 +57,15 @@ struct ucl_object *ucl_builtin_create(ucl_builtin builtin)
|
||||
return obj;
|
||||
}
|
||||
|
||||
struct ucl_object *ucl_special_create(ucl_lisp special)
|
||||
{
|
||||
struct ucl_object* obj = ucl_object_alloc();
|
||||
obj->type = UCL_TYPE_SPECIAL;
|
||||
obj->special = special;
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
static struct ucl_object* ucl_object_alloc() {
|
||||
return malloc(sizeof(struct ucl_object));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user