commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 03/09: runtime: added default xtor & dtor t


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/09: runtime: added default xtor & dtor to tag_t; srcid default is now PMT_F
Date: Sun, 26 Apr 2015 22:37:13 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 3c2571a78c52b77bfb7b39aae8d3e13011262393
Author: Sean Nowlan <address@hidden>
Date:   Sun Apr 26 17:04:36 2015 -0400

    runtime: added default xtor & dtor to tag_t; srcid default is now PMT_F
---
 gnuradio-runtime/include/gnuradio/tags.h         | 12 ++++++++++++
 gnuradio-runtime/python/gnuradio/gr/tag_utils.py |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnuradio-runtime/include/gnuradio/tags.h 
b/gnuradio-runtime/include/gnuradio/tags.h
index 4e63d77..0551e46 100644
--- a/gnuradio-runtime/include/gnuradio/tags.h
+++ b/gnuradio-runtime/include/gnuradio/tags.h
@@ -60,6 +60,18 @@ namespace gr {
       return (t.key == key) && (t.value == value) && \
       (t.srcid == srcid) && (t.offset == offset);
     }
+
+    tag_t()
+      : offset(0),
+        key(pmt::PMT_NIL),
+        value(pmt::PMT_NIL),
+        srcid(pmt::PMT_F)    // consistent with default srcid value in 
block::add_item_tag
+    {
+    }
+
+    ~tag_t()
+    {
+    }
   };
 
 } /* namespace gr */
diff --git a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py 
b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
index ba46e3f..ab03958 100644
--- a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
@@ -8,7 +8,7 @@ class PythonTag(object):
         self.offset = None
         self.key    = None
         self.value  = None
-        self.srcid  = None
+        self.srcid  = pmt.PMT_F
 
 def tag_to_python(tag):
     """ Convert a stream tag to a Python-readable object """



reply via email to

[Prev in Thread] Current Thread [Next in Thread]