mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
add kv_pair_size
git-svn-id: file:///svn/tokudb@435 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
016237bfee
commit
a2dcdeeefd
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,11 @@ struct kv_pair {
|
||||||
char key[];
|
char key[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* return the size of a kv pair */
|
||||||
|
static inline int kv_pair_size(struct kv_pair *pair) {
|
||||||
|
return sizeof (struct kv_pair) + pair->keylen + pair->vallen;
|
||||||
|
}
|
||||||
|
|
||||||
static inline void kv_pair_init(struct kv_pair *pair, void *key, int keylen, void *val, int vallen) {
|
static inline void kv_pair_init(struct kv_pair *pair, void *key, int keylen, void *val, int vallen) {
|
||||||
|
|
||||||
pair->keylen = keylen;
|
pair->keylen = keylen;
|
||||||
|
|
Loading…
Add table
Reference in a new issue