aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/decode.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-11-16 11:09:04 -0500
committerJames McCoy <jamessan@jamessan.com>2017-06-04 22:12:13 -0400
commit81be7358be00d3d75453659bcdc7efc69207ca8e (patch)
tree9dc19a6e3bda44c63ab678292d498d1b2f504c81 /src/nvim/eval/decode.c
parent953f26bace041f481e79b67b64401aa07259055c (diff)
downloadrneovim-81be7358be00d3d75453659bcdc7efc69207ca8e.tar.gz
rneovim-81be7358be00d3d75453659bcdc7efc69207ca8e.tar.bz2
rneovim-81be7358be00d3d75453659bcdc7efc69207ca8e.zip
vim-patch:7.4.1976
Problem: Number variables are not 64 bits while they could be. Solution: Add the num64 feature. (Ken Takata) https://github.com/vim/vim/commit/22fcfad29276bd5f317faf516637dcd491b96a12
Diffstat (limited to 'src/nvim/eval/decode.c')
-rw-r--r--src/nvim/eval/decode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval/decode.c b/src/nvim/eval/decode.c
index 935c98fb84..bf0abe04a3 100644
--- a/src/nvim/eval/decode.c
+++ b/src/nvim/eval/decode.c
@@ -435,7 +435,7 @@ static inline int parse_json_string(const char *const buf, const size_t buf_len,
case 'u': {
const char ubuf[] = { t[1], t[2], t[3], t[4] };
t += 4;
- unsigned long ch;
+ uvarnumber_T ch;
vim_str2nr((char_u *) ubuf, NULL, NULL,
STR2NR_HEX | STR2NR_FORCE, NULL, &ch, 4);
if (ch == 0) {
@@ -609,7 +609,7 @@ parse_json_number_check:
tv.v_type = VAR_FLOAT;
} else {
// Convert integer
- long nr;
+ varnumber_T nr;
int num_len;
vim_str2nr((char_u *) s, NULL, &num_len, 0, &nr, NULL, (int) (p - s));
if ((int) exp_num_len != num_len) {
@@ -617,7 +617,7 @@ parse_json_number_check:
"to integer vim_str2nr consumed %i bytes in place of %zu"),
(int) exp_num_len, s, num_len, exp_num_len);
}
- tv.vval.v_number = (varnumber_T) nr;
+ tv.vval.v_number = nr;
}
if (json_decoder_pop(OBJ(tv, false, *didcomma, *didcolon),
stack, container_stack,