|
@@ -2246,12 +2246,6 @@ qi_value_t *qi_call_debug(qi_state_t *state, qi_value_t *value,
|
|
}
|
|
}
|
|
|
|
|
|
static qi_bool _qi_guarded_equals(qi_state_t *state, qi_size_t depth, qi_list_t *tempstack, qi_value_t *a, qi_value_t *b) {
|
|
static qi_bool _qi_guarded_equals(qi_state_t *state, qi_size_t depth, qi_list_t *tempstack, qi_value_t *a, qi_value_t *b) {
|
|
- if (depth >= state->rlimit)
|
|
|
|
- qi_throw_format(state, "recursion depth exceeded while comparing nested values");
|
|
|
|
-
|
|
|
|
- if (a == b)
|
|
|
|
- return true;
|
|
|
|
-
|
|
|
|
qi_value_t *meta;
|
|
qi_value_t *meta;
|
|
if ((meta = qi_call_meta(state, NULL, a, "__equals", 2, a, b))) {
|
|
if ((meta = qi_call_meta(state, NULL, a, "__equals", 2, a, b))) {
|
|
if (meta->type != QI_BOOLEAN)
|
|
if (meta->type != QI_BOOLEAN)
|
|
@@ -2267,6 +2261,12 @@ static qi_bool _qi_guarded_equals(qi_state_t *state, qi_size_t depth, qi_list_t
|
|
return meta->value.boolean;
|
|
return meta->value.boolean;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (depth >= state->rlimit)
|
|
|
|
+ qi_throw_format(state, "recursion depth exceeded while comparing nested values");
|
|
|
|
+
|
|
|
|
+ if (a == b)
|
|
|
|
+ return true;
|
|
|
|
+
|
|
if (a->type != b->type)
|
|
if (a->type != b->type)
|
|
return false;
|
|
return false;
|
|
|
|
|