Commit a2dcdeee authored by Rich Prohaska's avatar Rich Prohaska

add kv_pair_size

git-svn-id: file:///svn/tokudb@435 c7de825b-a66e-492c-adef-691d508d4ae1
parent 016237bf
......@@ -14,6 +14,11 @@ struct kv_pair {
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) {
pair->keylen = keylen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment