Fixes for 'equal'

This commit is contained in:
2022-11-16 21:37:08 -05:00
parent 542366f74e
commit 13f6d66d2b

View File

@@ -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 *ucl_equal(
struct ucl_object *arg0, struct ucl_object *arg1) { 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) { if (arg0->type != arg1->type) {
return ucl_nil_create(); return ucl_nil_create();
} }