aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-07-16 00:34:24 +0300
committerZyX <kp-pav@yandex.ru>2017-03-27 00:11:27 +0300
commit425d348f0f9f680a44af31fc3cecd20a07374bb5 (patch)
tree7b647867aaade777b2562b6b5dcf3595e5e6e8a8 /src/nvim/api/vim.c
parent9297d941e2f1576006d77bfd6391cecc3bea37b0 (diff)
downloadrneovim-425d348f0f9f680a44af31fc3cecd20a07374bb5.tar.gz
rneovim-425d348f0f9f680a44af31fc3cecd20a07374bb5.tar.bz2
rneovim-425d348f0f9f680a44af31fc3cecd20a07374bb5.zip
executor/converter: Make nlua_pop_Object not recursive
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c54
1 files changed, 41 insertions, 13 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 24959e9a59..5d862628cb 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -197,19 +197,6 @@ Object nvim_eval(String expr, Error *err)
return rv;
}
-/// Returns object given as argument
-///
-/// This API function is used for testing. One should not rely on its presence
-/// in plugins.
-///
-/// @param[in] obj Object to return.
-///
-/// @return its argument.
-Object _vim_id(Object obj)
-{
- return obj;
-}
-
/// Calls a VimL function with the given arguments
///
/// On VimL error: Returns a generic error; v:errmsg is not updated.
@@ -843,3 +830,44 @@ static void write_msg(String message, bool to_err)
--no_wait_return;
msg_end();
}
+
+// Functions used for testing purposes
+
+/// Returns object given as argument
+///
+/// This API function is used for testing. One should not rely on its presence
+/// in plugins.
+///
+/// @param[in] obj Object to return.
+///
+/// @return its argument.
+Object _vim_id(Object obj)
+{
+ return obj;
+}
+
+/// Returns array given as argument
+///
+/// This API function is used for testing. One should not rely on its presence
+/// in plugins.
+///
+/// @param[in] arr Array to return.
+///
+/// @return its argument.
+Array _vim_id_array(Array arr)
+{
+ return arr;
+}
+
+/// Returns dictionary given as argument
+///
+/// This API function is used for testing. One should not rely on its presence
+/// in plugins.
+///
+/// @param[in] dct Dictionary to return.
+///
+/// @return its argument.
+Dictionary _vim_id_dictionary(Dictionary dct)
+{
+ return dct;
+}