[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/10: pmt::is_dict() and is_pair() both re
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/10: pmt::is_dict() and is_pair() both return true for both dictionaries and pairs. This causes issues as one may believe they have a dictionary pmt and attempt to reference it's keys (which will throw an exception for a pair). This simply serves to document this behavior |
Date: |
Sun, 27 Mar 2016 13:57:56 +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 a780a9eb53132356c3da9fdd22548846ccfdedd9
Author: Jacob Gilbert <address@hidden>
Date: Thu Mar 10 21:12:35 2016 -0800
pmt::is_dict() and is_pair() both return true for both dictionaries and
pairs. This causes issues as one may believe they have a dictionary pmt and
attempt to reference it's keys (which will throw an exception for a pair). This
simply serves to document this behavior
---
gnuradio-runtime/include/pmt/pmt.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnuradio-runtime/include/pmt/pmt.h
b/gnuradio-runtime/include/pmt/pmt.h
index f601c85..00564cc 100644
--- a/gnuradio-runtime/include/pmt/pmt.h
+++ b/gnuradio-runtime/include/pmt/pmt.h
@@ -279,7 +279,7 @@ PMT_API std::complex<double> to_complex(pmt_t z);
//! Return true if \p x is the empty list, otherwise return false.
PMT_API bool is_null(const pmt_t& x);
-//! Return true if \p obj is a pair, else false.
+//! Return true if \p obj is a pair, else false (warning: also returns true
for a dict)
PMT_API bool is_pair(const pmt_t& obj);
//! Return a newly allocated pair whose car is \p x and whose cdr is \p y.
@@ -575,7 +575,7 @@ PMT_API std::complex<double>
*c64vector_writable_elements(pmt_t v, size_t &len);
* ------------------------------------------------------------------------
*/
-//! Return true if \p obj is a dictionary
+//! Return true if \p obj is a dictionary (warning: also returns true for a
pair)
PMT_API bool is_dict(const pmt_t &obj);
//! Make an empty dictionary
- [Commit-gnuradio] [gnuradio] branch maint updated (0a1a76d -> 4ab650a), git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 03/10: ctrlport: gr-perf-monitorx: add small offset to avoid log(0) calls., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 01/10: ctrlport: Some version issues for running gr-perf-monitorx, git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 04/10: pmt::is_dict() and is_pair() both return true for both dictionaries and pairs. This causes issues as one may believe they have a dictionary pmt and attempt to reference it's keys (which will throw an exception for a pair). This simply serves to document this behavior,
git <=
- [Commit-gnuradio] [gnuradio] 07/10: gr-fec: correcting function name in GRC xml, git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 02/10: ctrlport: gr-perf-monitorx - don't stash the canvas, ask the figure., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 06/10: gr-fec: update/add documentation for LDPC GRC blocks., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 05/10: Merge remote-tracking branch 'jgilbert/pmt_doc_update' into maint, git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 10/10: gr-fec: Address make error when parallelism = 1 or 2., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 09/10: gr-fec: Adding doc in BER Curve Gen. block re: parallelism., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 08/10: gr-fec: Address missing block error in example GRC file., git, 2016/03/27