diff options
Diffstat (limited to 'src/api/helpers.h')
-rw-r--r-- | src/api/helpers.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/api/helpers.h b/src/api/helpers.h index b1faf4edee..ddb46eaad4 100644 --- a/src/api/helpers.h +++ b/src/api/helpers.h @@ -4,6 +4,7 @@ #include <stdbool.h> #include "api/defs.h" +#include "../vim.h" #define set_api_error(message, err) \ do { \ @@ -21,5 +22,12 @@ void try_start(void); /// @return true if an error occurred bool try_end(Error *err); +/// Convert a vim object to an `Object` instance, recursively expanding +/// Arrays/Dictionaries. +/// +/// @param obj The source object +/// @return The converted value +Object vim_to_object(typval_T *obj); + #endif /* NEOVIM_API_HELPERS_H */ |