summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/pmt/pmt.cc
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-06-27 15:09:56 -0400
committerTom Rondeau <tom@trondeau.com>2014-06-28 13:58:57 -0400
commit3d8a19b55a15a285d5a95d1e786cb93e26cb4f3a (patch)
tree6e76b706bfe46b0af9b59f43465b8a2125042700 /gnuradio-runtime/lib/pmt/pmt.cc
parent34b04e3f9a1e9f20d1011a23192b97ea9b7e6b04 (diff)
runtime: mods for pmt's NIL.
Diffstat (limited to 'gnuradio-runtime/lib/pmt/pmt.cc')
-rw-r--r--gnuradio-runtime/lib/pmt/pmt.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/pmt/pmt.cc b/gnuradio-runtime/lib/pmt/pmt.cc
index 8315100ab3..082b98a80d 100644
--- a/gnuradio-runtime/lib/pmt/pmt.cc
+++ b/gnuradio-runtime/lib/pmt/pmt.cc
@@ -160,9 +160,14 @@ _any(pmt_t x)
const pmt_t PMT_T = pmt_t(new pmt_bool()); // singleton
const pmt_t PMT_F = pmt_t(new pmt_bool()); // singleton
-const pmt_t PMT_NIL = pmt_t(new pmt_null()); // singleton
const pmt_t PMT_EOF = cons(PMT_NIL, PMT_NIL); // singleton
+pmt_t get_PMT_NIL()
+{
+ static pmt_t NIL = pmt_t(new pmt_null());
+ return NIL;
+}
+
////////////////////////////////////////////////////////////////////////////
// Booleans
////////////////////////////////////////////////////////////////////////////
@@ -1388,7 +1393,7 @@ list_has(pmt_t list, const pmt_t& item)
pmt_t right = cdr(list);
if(equal(left,item))
return true;
- return list_has(right, item);
+ return list_has(right, item);
} else {
if(is_null(list))
return false;