diff options
author | TJ DeVries <devries.timothyj@gmail.com> | 2020-06-19 00:23:30 -0400 |
---|---|---|
committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-07-10 16:17:33 -0400 |
commit | 971a191c4d772493535d55524b994fe385fae546 (patch) | |
tree | 3f8cb844a1ddb58ab917b6ceb78e4984a1fbbd58 /src/nvim/eval/typval.h | |
parent | a695da7d3fac19624d458e3f2980b4c0e55f50a4 (diff) | |
download | rneovim-971a191c4d772493535d55524b994fe385fae546.tar.gz rneovim-971a191c4d772493535d55524b994fe385fae546.tar.bz2 rneovim-971a191c4d772493535d55524b994fe385fae546.zip |
lua: Add ability to pass lua functions directly to vimL
Diffstat (limited to 'src/nvim/eval/typval.h')
-rw-r--r-- | src/nvim/eval/typval.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h index 343dd205ff..cb13bec50d 100644 --- a/src/nvim/eval/typval.h +++ b/src/nvim/eval/typval.h @@ -271,6 +271,11 @@ typedef struct { /// Number of fixed variables used for arguments #define FIXVAR_CNT 12 +/// Callback interface for C function reference +typedef int (*cfunc_T)(int argcount, typval_T *argvars, typval_T *rettv, void *state); // NOLINT +/// Callback to clear cfunc_T +typedef void (*cfunc_free_T)(void *state); + // Structure to hold info for a function that is currently being executed. typedef struct funccall_S funccall_T; @@ -307,6 +312,10 @@ struct ufunc { garray_T uf_lines; ///< function lines int uf_profiling; ///< true when func is being profiled int uf_prof_initialized; + // Managing cfuncs + cfunc_T uf_cb; ///< C function extension callback + cfunc_free_T uf_cb_free; ///< C function extesion free callback + void *uf_cb_state; ///< State of C function extension. // Profiling the function as a whole. int uf_tm_count; ///< nr of calls proftime_T uf_tm_total; ///< time spent in function + children |