eval: Fix failing test

This commit is contained in:
ZyX
2017-01-07 15:54:46 +03:00
parent 88a4820cc9
commit 9a09ffa883
4 changed files with 35 additions and 7 deletions

View File

@@ -152,6 +152,9 @@
/// @def TYPVAL_ENCODE_CONV_DICT_START
/// @brief Macros used before starting to convert non-empty dictionary
///
/// Only used for real dict_T* dictionaries, not for special dictionaries. Also
/// used for partial self dictionary.
///
/// @param tv Pointer to typval where dictionary is stored. May be NULL. May
/// point to a special dictionary.
/// @param dict Converted dictionary, lvalue or #TYPVAL_ENCODE_NODICT_VAR
@@ -159,6 +162,14 @@
/// @param len Dictionary length. Is an expression which evaluates to an
/// integer.
/// @def TYPVAL_ENCODE_CONV_REAL_DICT_AFTER_START
/// @brief Macros used after pushing dictionary onto the stack
///
/// @param tv Pointer to typval where dictionary is stored. May be NULL.
/// May not point to a special dictionary.
/// @param dict Converted dictionary, lvalue.
/// @param mpsv Pushed MPConvStackVal value.
/// @def TYPVAL_ENCODE_SPECIAL_DICT_KEY_CHECK
/// @brief Macros used to check special dictionary key
///
@@ -575,6 +586,8 @@ _convert_one_value_regular_dict:
},
},
}));
TYPVAL_ENCODE_CONV_REAL_DICT_AFTER_START(tv, tv->vval.v_dict,
_mp_last(*mpstack));
break;
}
case VAR_UNKNOWN: {
@@ -743,6 +756,8 @@ typval_encode_stop_converting_one_item:
},
},
}));
TYPVAL_ENCODE_CONV_REAL_DICT_AFTER_START(NULL, pt->pt_dict,
_mp_last(mpstack));
} else {
TYPVAL_ENCODE_CONV_FUNC_BEFORE_SELF(tv, -1);
}