-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextras.lua
47 lines (42 loc) · 864 Bytes
/
extras.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ffi.cdef[[
typedef void *(*spallocf)(void *ptr, size_t size, void *arg);
typedef int (*spcmpf)(char *a, size_t asz, char *b, size_t bsz, void *arg);
typedef enum {
/* env related */
SPDIR, /* uint32_t, char* */
SPALLOC, /* spallocf, void* */
SPCMP, /* spcmpf, void* */
SPPAGE, /* uint32_t */
SPGC, /* int */
SPGCF, /* double */
SPGROW, /* uint32_t, double */
SPMERGE, /* int */
SPMERGEWM, /* uint32_t */
/* db related */
SPMERGEFORCE,
/* unrelated */
SPVERSION /* uint32_t*, uint32_t* */
} spopt;
typedef enum {
SPO_RDONLY = 1,
SPO_RDWR = 2,
SPO_CREAT = 4,
SPO_SYNC = 8
} spflags;
typedef enum {
SPGT,
SPGTE,
SPLT,
SPLTE
} sporder;
typedef struct {
uint32_t epoch;
uint64_t psn;
uint32_t repn;
uint32_t repndb;
uint32_t repnxfer;
uint32_t catn;
uint32_t indexn;
uint32_t indexpages;
} spstat;
]]