From 03c31ceaccfe1812ea32765fa55cc573c6544159 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 5 Apr 2017 18:27:29 +0200 Subject: [PATCH] fixed serialization test example --- libretroshare/src/serialization/serial_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/serialization/serial_test.cc b/libretroshare/src/serialization/serial_test.cc index 67770ad87..a8d89a25f 100644 --- a/libretroshare/src/serialization/serial_test.cc +++ b/libretroshare/src/serialization/serial_test.cc @@ -100,7 +100,7 @@ class RsTestItem: public RsItem // virtual void serial_process(RsItem::SerializeJob j, SerializeContext& ctx) { - RsTypeSerializer::TlvString tt(str,TLV_TYPE_STR_DESCR) ; + RsTypeSerializer::TlvString_proxy tt(str,TLV_TYPE_STR_DESCR) ; RsTypeSerializer::serial_process(j,ctx,ts ,GET_VARIABLE_NAME(ts) ) ; RsTypeSerializer::serial_process(j,ctx,tt ,GET_VARIABLE_NAME(str) ) ; @@ -168,13 +168,13 @@ int main(int argc,char *argv[]) std::cerr << "Item to be serialized:" << std::endl; RsTestSerializer().print(&t1) ; - RsTestSerializer().serialise(&t1,mem1,mem1.size()) ; + RsTestSerializer().serialise(&t1,mem1,&size); std::cerr << "Serialized t1: " << RsUtil::BinToHex(mem1,mem1.size()) << std::endl; // Now deserialise into a new item // - RsItem *t2 = RsTestSerializer().deserialise(mem1,mem1.size()) ; + RsItem *t2 = RsTestSerializer().deserialise(mem1,&size); // make sure t1 is equal to t2 //