mirror of
https://github.com/neovim/neovim.git
synced 2025-09-21 10:48:18 +00:00
eval/typval_encode: Handle NULL partials properly
This commit is contained in:
@@ -87,7 +87,7 @@
|
|||||||
/// @brief Macros used when starting to convert a funcref or a partial
|
/// @brief Macros used when starting to convert a funcref or a partial
|
||||||
///
|
///
|
||||||
/// @param tv Pointer to typval where value is stored. May not be NULL.
|
/// @param tv Pointer to typval where value is stored. May not be NULL.
|
||||||
/// @param fun Function name.
|
/// @param fun Function name. May be NULL.
|
||||||
|
|
||||||
/// @def TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS
|
/// @def TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS
|
||||||
/// @brief Macros used before starting to convert partial arguments
|
/// @brief Macros used before starting to convert partial arguments
|
||||||
@@ -317,7 +317,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
|
|||||||
case VAR_PARTIAL: {
|
case VAR_PARTIAL: {
|
||||||
partial_T *const pt = tv->vval.v_partial;
|
partial_T *const pt = tv->vval.v_partial;
|
||||||
(void)pt;
|
(void)pt;
|
||||||
TYPVAL_ENCODE_CONV_FUNC_START(tv, pt->pt_name);
|
TYPVAL_ENCODE_CONV_FUNC_START(tv, (pt == NULL ? NULL : pt->pt_name));
|
||||||
_mp_push(*mpstack, ((MPConvStackVal) {
|
_mp_push(*mpstack, ((MPConvStackVal) {
|
||||||
.type = kMPConvPartial,
|
.type = kMPConvPartial,
|
||||||
.tv = tv,
|
.tv = tv,
|
||||||
|
Reference in New Issue
Block a user