diff --git a/src/utility.c b/src/utility.c index cfe9cab..91d5a0d 100644 --- a/src/utility.c +++ b/src/utility.c @@ -177,6 +177,14 @@ struct ucl_object *ucl_progn(struct ucl_scope *state, struct ucl_object *forms) struct ucl_object *ucl_equal( struct ucl_object *arg0, struct ucl_object *arg1) { + if (arg0 == arg1) { + return ucl_t_create(); + } + + if ((arg0 == NULL) || (arg1 == NULL)) { + return ucl_nil_create(); + } + if (arg0->type != arg1->type) { return ucl_nil_create(); }