diff options
author | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:00:57 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:17:00 -0500 |
commit | 9c4223215f71e1212462ada4e698be1b31437dd9 (patch) | |
tree | c5f55c47f2398f0f048bcd6e19dd592542aa4c15 /src/nvim/eval.c | |
parent | e2cc5fe09d98ce1ccaaa666a835c896805ccc196 (diff) | |
download | rneovim-9c4223215f71e1212462ada4e698be1b31437dd9.tar.gz rneovim-9c4223215f71e1212462ada4e698be1b31437dd9.tar.bz2 rneovim-9c4223215f71e1212462ada4e698be1b31437dd9.zip |
libcallnr: Use int, not int64_t, as the return type for Vim compat
Vim's documentation simply states that libcallnr() should be used "for a
function that returns an int". Based on the tests, code, and common
syscall interfaces, this should likely be taken literally instead of
trying to apply some well-defined type lipstick.
Notably, this change fixes Test_libcall_libcallnr on hppa (a 32-bit
big-endian system).
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 1f753608d2..e39f36957c 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -12651,7 +12651,7 @@ static void libcall_common(typval_T *argvars, typval_T *rettv, int out_type) const char *libname = (char *) argvars[0].vval.v_string; const char *funcname = (char *) argvars[1].vval.v_string; - int in_type = argvars[2].v_type; + VarType in_type = argvars[2].v_type; // input variables char *str_in = (in_type == VAR_STRING) @@ -12660,8 +12660,8 @@ static void libcall_common(typval_T *argvars, typval_T *rettv, int out_type) // output variables char **str_out = (out_type == VAR_STRING) - ? (char **) &rettv->vval.v_string : NULL; - int64_t int_out = 0; + ? (char **)&rettv->vval.v_string : NULL; + int int_out = 0; bool success = os_libcall(libname, funcname, str_in, int_in, @@ -12673,7 +12673,7 @@ static void libcall_common(typval_T *argvars, typval_T *rettv, int out_type) } if (out_type == VAR_NUMBER) { - rettv->vval.v_number = (int) int_out; + rettv->vval.v_number = (varnumber_T)int_out; } } |