summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-04 22:20:26 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-04 22:20:26 +0100
commita471eeae75cda982bb6ddffbb0cbb71d868b97bf (patch)
treebdd8d5b249cd291c30a2d96e77d48cb8f5d4dd17
parenta65bb53514a1af1ec0dc5c4831dfaef69f139a48 (diff)
patch 8.2.0355: Vim9: str_val is confusing, it's a numberv8.2.0355
Problem: Vim9: str_val is confusing, it's a number Solution: Rename to stnr_val.
-rw-r--r--src/version.c2
-rw-r--r--src/vim9.h6
-rw-r--r--src/vim9compile.c8
-rw-r--r--src/vim9execute.c8
4 files changed, 13 insertions, 11 deletions
diff --git a/src/version.c b/src/version.c
index 1cbe9e298a..f494186ffe 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 355,
+/**/
354,
/**/
353,
diff --git a/src/vim9.h b/src/vim9.h
index 35d34e3af4..38286b32a1 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -36,7 +36,7 @@ typedef enum {
ISN_STOREREG, // pop into register isn_arg.number
// ISN_STOREOTHER, // pop into other script variable isn_arg.other.
- ISN_STORENR, // store number into local variable isn_arg.storenr.str_idx
+ ISN_STORENR, // store number into local variable isn_arg.storenr.stnr_idx
// constants
ISN_PUSHNR, // push number isn_arg.number
@@ -178,8 +178,8 @@ typedef struct {
// arguments to ISN_STORENR
typedef struct {
- int str_idx;
- varnumber_T str_val;
+ int stnr_idx;
+ varnumber_T stnr_val;
} storenr_T;
// arguments to ISN_STOREOPT
diff --git a/src/vim9compile.c b/src/vim9compile.c
index c9f72f52b3..6618b6aceb 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -773,8 +773,8 @@ generate_STORENR(cctx_T *cctx, int idx, varnumber_T value)
RETURN_OK_IF_SKIP(cctx);
if ((isn = generate_instr(cctx, ISN_STORENR)) == NULL)
return FAIL;
- isn->isn_arg.storenr.str_idx = idx;
- isn->isn_arg.storenr.str_val = value;
+ isn->isn_arg.storenr.stnr_idx = idx;
+ isn->isn_arg.storenr.stnr_val = value;
return OK;
}
@@ -3789,8 +3789,8 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
garray_T *stack = &cctx->ctx_type_stack;
isn->isn_type = ISN_STORENR;
- isn->isn_arg.storenr.str_idx = idx;
- isn->isn_arg.storenr.str_val = val;
+ isn->isn_arg.storenr.stnr_idx = idx;
+ isn->isn_arg.storenr.stnr_val = val;
if (stack->ga_len > 0)
--stack->ga_len;
}
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 094ee72ce9..2fcb948cae 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -827,10 +827,10 @@ call_def_function(
// store number in local variable
case ISN_STORENR:
- tv = STACK_TV_VAR(iptr->isn_arg.storenr.str_idx);
+ tv = STACK_TV_VAR(iptr->isn_arg.storenr.stnr_idx);
clear_tv(tv);
tv->v_type = VAR_NUMBER;
- tv->vval.v_number = iptr->isn_arg.storenr.str_val;
+ tv->vval.v_number = iptr->isn_arg.storenr.stnr_val;
break;
// push constant
@@ -1848,8 +1848,8 @@ ex_disassemble(exarg_T *eap)
break;
case ISN_STORENR:
smsg("%4d STORE %lld in $%d", current,
- iptr->isn_arg.storenr.str_val,
- iptr->isn_arg.storenr.str_idx);
+ iptr->isn_arg.storenr.stnr_val,
+ iptr->isn_arg.storenr.stnr_idx);
break;
// constants