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