add kv_pair_size

git-svn-id: file:///svn/tokudb@435 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Rich Prohaska 2007-10-10 19:20:08 +00:00
parent 016237bfee
commit a2dcdeeefd

View file

@ -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;