summaryrefslogtreecommitdiff
path: root/gruel
diff options
context:
space:
mode:
authorTim O'Shea2012-06-20 12:24:54 -0400
committerTim O'Shea2012-06-20 12:24:54 -0400
commit7e24c8d52a04e92d755a44ab56e28b63eeb86ea0 (patch)
tree96a42367048bc374856d636cf577e54237fdda1b /gruel
parente42a6889a2966d8e9fd4e6b2b1bb3dd28c9794c9 (diff)
downloadgnuradio-7e24c8d52a04e92d755a44ab56e28b63eeb86ea0.tar.gz
gnuradio-7e24c8d52a04e92d755a44ab56e28b63eeb86ea0.tar.bz2
gnuradio-7e24c8d52a04e92d755a44ab56e28b63eeb86ea0.zip
bug fixxes to tuple serialize
Diffstat (limited to 'gruel')
-rw-r--r--gruel/src/lib/pmt/pmt_serialize.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/gruel/src/lib/pmt/pmt_serialize.cc b/gruel/src/lib/pmt/pmt_serialize.cc
index 8c9dd12b3..3c62b01f6 100644
--- a/gruel/src/lib/pmt/pmt_serialize.cc
+++ b/gruel/src/lib/pmt/pmt_serialize.cc
@@ -24,7 +24,6 @@
#endif
#include <vector>
#include <gruel/pmt.h>
-#include <iostream>
#include "pmt_int.h"
#include "gruel/pmt_serial_tags.h"
@@ -217,13 +216,10 @@ deserialize_untagged_f64(double *ip, std::streambuf &sb)
static bool
deserialize_tuple(pmt_t *tuple, std::streambuf &sb)
{
- std::cout << "deserialize_tuple\n";
uint32_t nitems;
bool ok = deserialize_untagged_u32(&nitems, sb);
pmt_t list(PMT_NIL);
- std::cout << "nitems: " << nitems << "\n";
for(uint32_t i=0; i<nitems; i++){
- std::cout << "deserialize_tuple :: recursive call to pmt_deserialize\n";
pmt_t item = pmt_deserialize( sb );
pmt_print(item);
if(pmt_eq(list, PMT_NIL)){
@@ -325,7 +321,7 @@ pmt_serialize(pmt_t obj, std::streambuf &sb)
if (pmt_is_tuple(obj)){
size_t tuple_len = pmt::pmt_length(obj);
- ok = serialize_untagged_u8(PST_COMPLEX, sb);
+ ok = serialize_untagged_u8(PST_TUPLE, sb);
ok &= serialize_untagged_u32(tuple_len, sb);
for(size_t i=0; i<tuple_len; i++){
ok &= pmt_serialize(pmt_tuple_ref(obj, i), sb);
@@ -406,8 +402,9 @@ pmt_deserialize(std::streambuf &sb)
case PST_TUPLE:
{
pmt_t tuple;
- if(!deserialize_tuple(&tuple, sb));
+ if(!deserialize_tuple(&tuple, sb)){
goto error;
+ }
return tuple;
}