diff options
author | Eric Blossom | 2009-12-07 18:58:07 -0800 |
---|---|---|
committer | Eric Blossom | 2009-12-07 18:58:07 -0800 |
commit | 72a8a242ea58eb624dcecf50409a199daead543f (patch) | |
tree | 8c83b2e586dd8043697fe5df7a55a81e73332eb5 /gnuradio-core/src/lib | |
parent | e820ce5ca1475a56ef52e7384d0cf094b0127932 (diff) | |
download | gnuradio-72a8a242ea58eb624dcecf50409a199daead543f.tar.gz gnuradio-72a8a242ea58eb624dcecf50409a199daead543f.tar.bz2 gnuradio-72a8a242ea58eb624dcecf50409a199daead543f.zip |
Change type of gr_head nitems parameter to unsigned long long.
Patch from Martin Braun <martin.braun@kit.edu> to support
nitems >= 2**32.
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_head.cc | 6 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_head.h | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_head.i | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/gnuradio-core/src/lib/general/gr_head.cc b/gnuradio-core/src/lib/general/gr_head.cc index 01035ffcd..b52735c06 100644 --- a/gnuradio-core/src/lib/general/gr_head.cc +++ b/gnuradio-core/src/lib/general/gr_head.cc @@ -27,7 +27,7 @@ #include <gr_io_signature.h> #include <string.h> -gr_head::gr_head (size_t sizeof_stream_item, int nitems) +gr_head::gr_head (size_t sizeof_stream_item, unsigned long long nitems) : gr_sync_block ("head", gr_make_io_signature (1, 1, sizeof_stream_item), gr_make_io_signature (1, 1, sizeof_stream_item)), @@ -36,7 +36,7 @@ gr_head::gr_head (size_t sizeof_stream_item, int nitems) } gr_head_sptr -gr_make_head (size_t sizeof_stream_item, int nitems) +gr_make_head (size_t sizeof_stream_item, unsigned long long nitems) { return gnuradio::get_initial_sptr(new gr_head (sizeof_stream_item, nitems)); } @@ -49,7 +49,7 @@ gr_head::work (int noutput_items, if (d_ncopied_items >= d_nitems) return -1; // Done! - unsigned n = std::min (d_nitems - d_ncopied_items, noutput_items); + unsigned n = std::min (d_nitems - d_ncopied_items, (unsigned long long) noutput_items); if (n == 0) return 0; diff --git a/gnuradio-core/src/lib/general/gr_head.h b/gnuradio-core/src/lib/general/gr_head.h index 430d5f8b9..f7eee1064 100644 --- a/gnuradio-core/src/lib/general/gr_head.h +++ b/gnuradio-core/src/lib/general/gr_head.h @@ -38,11 +38,11 @@ typedef boost::shared_ptr<gr_head> gr_head_sptr; class gr_head : public gr_sync_block { - friend gr_head_sptr gr_make_head (size_t sizeof_stream_item, int nitems); - gr_head (size_t sizeof_stream_item, int nitems); + friend gr_head_sptr gr_make_head (size_t sizeof_stream_item, unsigned long long nitems); + gr_head (size_t sizeof_stream_item, unsigned long long nitems); - int d_nitems; - int d_ncopied_items; + unsigned long long d_nitems; + unsigned long long d_ncopied_items; public: int work (int noutput_items, @@ -53,7 +53,7 @@ class gr_head : public gr_sync_block }; gr_head_sptr -gr_make_head (size_t sizeof_stream_item, int nitems); +gr_make_head (size_t sizeof_stream_item, unsigned long long nitems); #endif /* INCLUDED_GR_HEAD_H */ diff --git a/gnuradio-core/src/lib/general/gr_head.i b/gnuradio-core/src/lib/general/gr_head.i index 2a88b885f..3aece9601 100644 --- a/gnuradio-core/src/lib/general/gr_head.i +++ b/gnuradio-core/src/lib/general/gr_head.i @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,head); -gr_head_sptr gr_make_head(size_t sizeof_stream_item, int nitems); +gr_head_sptr gr_make_head(size_t sizeof_stream_item, unsigned long long nitems); class gr_head : public gr_block { gr_head(); |