From 2733813c87bebcfbce4e0f2ffdf1497370ac6424 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 24 Dec 2014 12:08:38 +0200 Subject: [PATCH] db: add a "bytes" type, corresponding to ByteBuffer (serialized values) Using sstring can lead to confusion with UTF8 strings. The Java byte type is signed, so make bytes' internal type be signed as well (even though Cassandra tries to treat it as unsigned). While we should use int8_t, sstring is not perfectly compatible with this yet, so add a FIXME and use char instead. --- database.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/database.hh b/database.hh index 7d60c5c236..ed09bd0a81 100644 --- a/database.hh +++ b/database.hh @@ -19,6 +19,9 @@ using bytes = basic_sstring; +// FIXME: should be int8_t +using bytes = basic_sstring; + struct row { std::vector cells; };