aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/executor.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-08-28 08:55:58 +0300
committerZyX <kp-pav@yandex.ru>2017-03-29 10:08:05 +0300
commit233b0c93bba66492d7b8b61f8ac61082f03668a1 (patch)
tree4d7719c96f41a6275563696e268626b6859d4be2 /src/nvim/eval/executor.c
parent1b3e13da5be48739ac4291208e421b68e607cc0f (diff)
downloadrneovim-233b0c93bba66492d7b8b61f8ac61082f03668a1.tar.gz
rneovim-233b0c93bba66492d7b8b61f8ac61082f03668a1.tar.bz2
rneovim-233b0c93bba66492d7b8b61f8ac61082f03668a1.zip
eval: Move get_tv_number[_chk] to eval/typval.c
Diffstat (limited to 'src/nvim/eval/executor.c')
-rw-r--r--src/nvim/eval/executor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c
index d2d0873792..ec6c86ac64 100644
--- a/src/nvim/eval/executor.c
+++ b/src/nvim/eval/executor.c
@@ -50,7 +50,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2,
}
if (*op == '+' || *op == '-') {
// nr += nr or nr -= nr
- varnumber_T n = get_tv_number(tv1);
+ varnumber_T n = tv_get_number(tv1);
if (tv2->v_type == VAR_FLOAT) {
float_T f = n;
@@ -64,9 +64,9 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2,
tv1->vval.v_float = f;
} else {
if (*op == '+') {
- n += get_tv_number(tv2);
+ n += tv_get_number(tv2);
} else {
- n -= get_tv_number(tv2);
+ n -= tv_get_number(tv2);
}
tv_clear(tv1);
tv1->v_type = VAR_NUMBER;
@@ -96,7 +96,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2,
}
const float_T f = (tv2->v_type == VAR_FLOAT
? tv2->vval.v_float
- : get_tv_number(tv2));
+ : tv_get_number(tv2));
if (*op == '+') {
tv1->vval.v_float += f;
} else {