mirror of
https://github.com/neovim/neovim.git
synced 2025-11-10 04:25:22 +00:00
Merge pull request #36253 from janlazo/vim-9.0.1033
vim-patch:8.2.3673,9.0.{433,1033}
This commit is contained in:
@@ -1378,7 +1378,7 @@ static char *get_lval_subscript(lval_T *lp, char *p, char *name, typval_T *rettv
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// a NULL list/blob works like an empty list/blob, allocate one now.
|
// A NULL list/blob works like an empty list/blob, allocate one now.
|
||||||
if (lp->ll_tv->v_type == VAR_LIST && lp->ll_tv->vval.v_list == NULL) {
|
if (lp->ll_tv->v_type == VAR_LIST && lp->ll_tv->vval.v_list == NULL) {
|
||||||
tv_list_alloc_ret(lp->ll_tv, kListLenUnknown);
|
tv_list_alloc_ret(lp->ll_tv, kListLenUnknown);
|
||||||
} else if (lp->ll_tv->v_type == VAR_BLOB && lp->ll_tv->vval.v_blob == NULL) {
|
} else if (lp->ll_tv->v_type == VAR_BLOB && lp->ll_tv->vval.v_blob == NULL) {
|
||||||
|
|||||||
@@ -3341,7 +3341,7 @@ void tv_dict_remove(typval_T *argvars, typval_T *rettv, const char *arg_errmsg)
|
|||||||
///
|
///
|
||||||
/// @param[out] ret_tv Structure where blob is saved.
|
/// @param[out] ret_tv Structure where blob is saved.
|
||||||
blob_T *tv_blob_alloc_ret(typval_T *const ret_tv)
|
blob_T *tv_blob_alloc_ret(typval_T *const ret_tv)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET
|
||||||
{
|
{
|
||||||
blob_T *const b = tv_blob_alloc();
|
blob_T *const b = tv_blob_alloc();
|
||||||
tv_blob_set_ret(ret_tv, b);
|
tv_blob_set_ret(ret_tv, b);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ typedef struct dictvar_S dict_T;
|
|||||||
typedef struct partial_S partial_T;
|
typedef struct partial_S partial_T;
|
||||||
typedef struct blobvar_S blob_T;
|
typedef struct blobvar_S blob_T;
|
||||||
|
|
||||||
typedef struct ufunc ufunc_T;
|
typedef struct ufunc_S ufunc_T;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
kCallbackNone = 0,
|
kCallbackNone = 0,
|
||||||
@@ -321,7 +321,7 @@ struct funccall_S {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Structure to hold info for a user function.
|
/// Structure to hold info for a user function.
|
||||||
struct ufunc {
|
struct ufunc_S {
|
||||||
int uf_varargs; ///< variable nr of arguments
|
int uf_varargs; ///< variable nr of arguments
|
||||||
int uf_flags;
|
int uf_flags;
|
||||||
int uf_calls; ///< nr of active calls
|
int uf_calls; ///< nr of active calls
|
||||||
|
|||||||
@@ -643,7 +643,7 @@ void reset_last_sourcing(void)
|
|||||||
/// @return true if "SOURCING_NAME" differs from "last_sourcing_name".
|
/// @return true if "SOURCING_NAME" differs from "last_sourcing_name".
|
||||||
static bool other_sourcing_name(void)
|
static bool other_sourcing_name(void)
|
||||||
{
|
{
|
||||||
if (SOURCING_NAME != NULL) {
|
if (HAVE_SOURCING_INFO && SOURCING_NAME != NULL) {
|
||||||
if (last_sourcing_name != NULL) {
|
if (last_sourcing_name != NULL) {
|
||||||
return strcmp(SOURCING_NAME, last_sourcing_name) != 0;
|
return strcmp(SOURCING_NAME, last_sourcing_name) != 0;
|
||||||
}
|
}
|
||||||
@@ -659,7 +659,7 @@ static bool other_sourcing_name(void)
|
|||||||
static char *get_emsg_source(void)
|
static char *get_emsg_source(void)
|
||||||
FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
|
FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
if (SOURCING_NAME != NULL && other_sourcing_name()) {
|
if (HAVE_SOURCING_INFO && SOURCING_NAME != NULL && other_sourcing_name()) {
|
||||||
char *sname = estack_sfile(ESTACK_NONE);
|
char *sname = estack_sfile(ESTACK_NONE);
|
||||||
char *tofree = sname;
|
char *tofree = sname;
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
/// Stack of execution contexts. Each entry is an estack_T.
|
/// Stack of execution contexts. Each entry is an estack_T.
|
||||||
/// Current context is at ga_len - 1.
|
/// Current context is at ga_len - 1.
|
||||||
extern garray_T exestack;
|
extern garray_T exestack;
|
||||||
|
#define HAVE_SOURCING_INFO (exestack.ga_data != NULL && exestack.ga_len > 0)
|
||||||
/// name of error message source
|
/// name of error message source
|
||||||
#define SOURCING_NAME (((estack_T *)exestack.ga_data)[exestack.ga_len - 1].es_name)
|
#define SOURCING_NAME (((estack_T *)exestack.ga_data)[exestack.ga_len - 1].es_name)
|
||||||
/// line number in the message source or zero
|
/// line number in the message source or zero
|
||||||
|
|||||||
Reference in New Issue
Block a user