mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
eval.c: factor out eval/funcs.c #11828
close #11828 ref #5081 cf. vim patch 7.4.2063
This commit is contained in:

committed by
Justin M. Keyes

parent
d34f042ed5
commit
6c5bbf07d9
24
src/nvim/eval/funcs.h
Normal file
24
src/nvim/eval/funcs.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef NVIM_EVAL_FUNCS_H
|
||||
#define NVIM_EVAL_FUNCS_H
|
||||
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/eval/typval.h"
|
||||
|
||||
typedef void (*FunPtr)(void);
|
||||
|
||||
/// Prototype of C function that implements VimL function
|
||||
typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, FunPtr data);
|
||||
|
||||
/// Structure holding VimL function definition
|
||||
typedef struct fst {
|
||||
char *name; ///< Name of the function.
|
||||
uint8_t min_argc; ///< Minimal number of arguments.
|
||||
uint8_t max_argc; ///< Maximal number of arguments.
|
||||
VimLFunc func; ///< Function implementation.
|
||||
FunPtr data; ///< Userdata for function implementation.
|
||||
} VimLFuncDef;
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "eval/funcs.h.generated.h"
|
||||
#endif
|
||||
#endif // NVIM_EVAL_FUNCS_H
|
Reference in New Issue
Block a user