This commit is contained in:
James McCoy 2017-06-06 05:38:34 -04:00
parent 9a21d89b17
commit 75c32b549b
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -1256,18 +1256,16 @@ int call_vim_function(
return ret; return ret;
} }
/* /// Call Vim script function and return the result as a number
* Call vim script function "func" and return the result as a number. ///
* Returns -1 when calling the function fails. /// @param[in] func Function name.
* Uses argv[argc] for the function arguments. /// @param[in] argc Number of arguments.
*/ /// @param[in] argv Array with string arguments.
long /// @param[in] safe Use with sandbox.
call_func_retnr ( ///
char_u *func, /// @return -1 when calling function fails, result of function otherwise.
int argc, long call_func_retnr(char_u *func, int argc, const char_u *const *const argv,
const char_u *const *const argv, int safe)
int safe // use the sandbox
)
{ {
typval_T rettv; typval_T rettv;
long retval; long retval;
@ -1288,7 +1286,7 @@ call_func_retnr (
/// @param[in] argv Array with string arguments. /// @param[in] argv Array with string arguments.
/// @param[in] safe Use the sandbox. /// @param[in] safe Use the sandbox.
/// ///
/// @return [allocated] NULL when calling function failes, allocated string /// @return [allocated] NULL when calling function fails, allocated string
/// otherwise. /// otherwise.
char *call_func_retstr(const char *const func, const int argc, char *call_func_retstr(const char *const func, const int argc,
const char_u *const *const argv, const char_u *const *const argv,
@ -1307,18 +1305,17 @@ char *call_func_retstr(const char *const func, const int argc,
return retval; return retval;
} }
/* /// Call Vim script function and return the result as a List
* Call Vim script function "func" and return the result as a List. ///
* Uses argv[argc] for the function arguments. /// @param[in] func Function name.
* Returns NULL when there is something wrong. /// @param[in] argc Number of arguments.
*/ /// @param[in] argv Array with string arguments.
void * /// @param[in] safe Use the sandbox.
call_func_retlist ( ///
char_u *func, /// @return [allocated] NULL when calling function fails or return tv is not a
int argc, /// List, allocated List otherwise.
const char_u *const *const argv, void *call_func_retlist(char_u *func, int argc, const char_u *const *const argv,
int safe // use the sandbox int safe)
)
{ {
typval_T rettv; typval_T rettv;