mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 09:48:19 +00:00
eval/typval: Add tv_list_equal() tests, compare NULL lists equal
This commit is contained in:
@@ -623,13 +623,12 @@ bool tv_list_equal(list_T *const l1, list_T *const l2, const bool ic,
|
||||
const bool recursive)
|
||||
FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
if (l1 == NULL || l2 == NULL) {
|
||||
// FIXME? compare empty list with NULL list equal
|
||||
return false;
|
||||
}
|
||||
if (l1 == l2) {
|
||||
return true;
|
||||
}
|
||||
if (l1 == NULL || l2 == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (tv_list_len(l1) != tv_list_len(l2)) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user