-
Notifications
You must be signed in to change notification settings - Fork 3
/
mdb.yml
91 lines (89 loc) · 4.26 KB
/
mdb.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
GENERATOR:
PackageName: mdb
PackageDescription: "Package mdb provides Go bindings for liblmdb, the Symas's LMDB database library.
LMDB is an ultra-fast, ultra-compact, crash-proof key-value embedded data store developed by Symas for the OpenLDAP Project.
It uses memory-mapped files, so it has the read performance of a pure in-memory database while still offering the persistence
of standard disk-based databases, and is only limited to the size of the virtual address space."
PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
Includes: [lmdb.h]
FlagGroups:
- {name: "CFLAGS", traits: ["linux"], flags: [-DMDB_USE_SYSV_SEM=1]}
- {name: "LDFLAGS", traits: ["windows"], flags: [-lntdll]}
PARSER:
IncludePaths: [/usr/include]
SourcesPaths: [mdb/lmdb.h]
TRANSLATOR:
ConstRules:
defines: expand
enum: eval
PtrTips:
function:
- {target: "mdb_version$", self: arr, tips: [ref,ref,ref]}
- {target: "mdb_strerror$", self: arr}
- {target: "mdb_env_create$", tips: [sref]}
- {target: "mdb_env_stat$", tips: [ref,ref]}
- {target: "mdb_env_info$", tips: [ref,ref]}
- {target: "mdb_env_get_flags$", tips: [ref,ref]}
- {target: "mdb_env_get_path$", tips: [ref,sref]}
- {target: "mdb_env_get_fd$", tips: [ref,ref]}
- {target: "mdb_env_get_maxreaders$", tips: [ref,ref]}
- {target: "mdb_txn_begin$", tips: [ref,ref,0,sref]}
- {target: "mdb_dbi_open$", tips: [ref,0,0,ref]}
- {target: "mdb_stat$", tips: [ref,0,ref]}
- {target: "mdb_dbi_flags$", tips: [ref,0,ref]}
- {target: "mdb_get$", tips: [ref,0,ref,ref]}
- {target: "mdb_put$", tips: [ref,0,ref,ref]}
- {target: "mdb_del$", tips: [ref,0,ref,ref]}
- {target: "mdb_cursor_open$", tips: [ref,0,sref]}
- {target: "mdb_cursor_renew$", tips: [ref,ref]}
- {target: "mdb_cursor_get$", tips: [ref,ref,ref]}
- {target: "mdb_cursor_put$", tips: [ref,ref,ref]}
- {target: "mdb_cursor_count$", tips: [ref,ref]}
- {target: "mdb_cmp$", tips: [ref,0,ref,ref]}
- {target: "mdb_dcmp$", tips: [ref,0,ref,ref]}
- {target: "mdb_reader_check$", tips: [ref,ref]}
- {target: "MDB_cmp_func$", tips: [ref,ref]}
- {target: "(?i)^mdb_", tips: [ref]}
Rules:
global:
- {transform: lower}
- {action: accept, from: "(?i)^mdb_"}
- {action: replace, from: "(?i)^mdb_", to: _}
const:
- {action: replace, from: "_success$", to: err_success}
- {action: replace, from: "_keyexist$", to: err_key_exist}
- {action: replace, from: "^_notfound$", to: err_not_found}
- {action: replace, from: "_page_notfound$", to: err_page_not_found}
- {action: replace, from: "_corrupted$", to: err_corrupted}
- {action: replace, from: "_panic$", to: err_panic}
- {action: replace, from: "_version_mismatch$", to: err_version_mismatch}
- {action: replace, from: "_invalid$", to: err_invalid}
- {action: replace, from: "_map_full$", to: err_map_full}
- {action: replace, from: "_dbs_full$", to: err_dbs_full}
- {action: replace, from: "_readers_full$", to: err_readers_full}
- {action: replace, from: "_tls_full$", to: err_tls_full}
- {action: replace, from: "_txn_full$", to: err_txn_full}
- {action: replace, from: "_cursor_full$", to: err_cursor_full}
- {action: replace, from: "_page_full$", to: err_page_full}
- {action: replace, from: "_map_resized$", to: err_map_resized}
- {action: replace, from: "_incompatible$", to: err_incompatible}
- {action: replace, from: "_bad_rslot$", to: err_bad_rslot}
- {action: replace, from: "_bad_txn$", to: err_bad_txn}
- {action: replace, from: "_bad_valsize$", to: err_value_size}
- {action: replace, from: "_bad_dbi$", to: err_bad_dbi}
function:
- {action: replace, from: "_strerror$", to: str_error}
type:
- {action: replace, from: "^me_"}
- {action: replace, from: "^ms_"}
- {action: replace, from: "^mv_"}
- {action: ignore, from: "_filehandle_t"}
- {action: replace, from: "_stat$", to: stats}
- {action: replace, from: "_t$"}
private:
- {transform: unexport}
post-global:
- {action: replace, from: _$}
- {load: snakecase}
- {transform: export}