context.h
Go to the documentation of this file.
1 #ifndef NVIM_CONTEXT_H
2 #define NVIM_CONTEXT_H
3 
4 #include <msgpack.h>
6 #include "nvim/lib/kvec.h"
7 
8 typedef struct {
9  msgpack_sbuffer regs;
10  msgpack_sbuffer jumps;
11  msgpack_sbuffer bufs;
12  msgpack_sbuffer gvars;
14 } Context;
15 typedef kvec_t(Context) ContextVec;
16 
17 #define MSGPACK_SBUFFER_INIT (msgpack_sbuffer) { \
18  .size = 0, \
19  .data = NULL, \
20  .alloc = 0, \
21 }
22 
23 #define CONTEXT_INIT (Context) { \
24  .regs = MSGPACK_SBUFFER_INIT, \
25  .jumps = MSGPACK_SBUFFER_INIT, \
26  .bufs = MSGPACK_SBUFFER_INIT, \
27  .gvars = MSGPACK_SBUFFER_INIT, \
28  .funcs = ARRAY_DICT_INIT, \
29 }
30 
31 typedef enum {
32  kCtxRegs = 1,
33  kCtxJumps = 2,
34  kCtxBufs = 4,
35  kCtxGVars = 8,
36  kCtxSFuncs = 16,
37  kCtxFuncs = 32,
39 
40 extern int kCtxAll;
41 
42 #ifdef INCLUDE_GENERATED_DECLARATIONS
43 # include "context.h.generated.h"
44 #endif
45 
46 #endif // NVIM_CONTEXT_H
Definition: context.h:8
Registers.
Definition: context.h:32
msgpack_sbuffer jumps
Jumplist.
Definition: context.h:10
msgpack_sbuffer regs
Registers.
Definition: context.h:9
Functions.
Definition: context.h:37
msgpack_sbuffer gvars
Global variables.
Definition: context.h:12
Buffer list.
Definition: context.h:34
msgpack_sbuffer bufs
Buffer list.
Definition: context.h:11
ContextTypeFlags
Definition: context.h:31
Global variables.
Definition: context.h:35
int kCtxAll
Definition: context.c:18
Definition: defs.h:87
typedef kvec_t(Context) ContextVec
Jumplist.
Definition: context.h:33
Script functions.
Definition: context.h:36
Array funcs
Functions.
Definition: context.h:13