From 169f5aef8460185715d87a7c3bd2aaf2145f8b63 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 17 Jan 2018 20:28:34 -0800 Subject: [PATCH] ircd::db: Add data() participant for rocksdb::Slice. --- include/ircd/db/db.h | 1 + ircd/db.cc | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/ircd/db/db.h b/include/ircd/db/db.h index 14d574ff5..dec470be1 100644 --- a/include/ircd/db/db.h +++ b/include/ircd/db/db.h @@ -95,6 +95,7 @@ namespace ircd::db rocksdb::Slice slice(const string_view &); string_view slice(const rocksdb::Slice &); size_t size(const rocksdb::Slice &); + const char *data(const rocksdb::Slice &); bool valid(const rocksdb::Iterator &); string_view key(const rocksdb::Iterator &); diff --git a/ircd/db.cc b/ircd/db.cc index 92b048908..c247cf249 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -4516,6 +4516,12 @@ ircd::db::val(const rocksdb::Iterator &it) return slice(it.value()); } +const char * +ircd::db::data(const rocksdb::Slice &slice) +{ + return slice.data(); +} + size_t ircd::db::size(const rocksdb::Slice &slice) {