From 72a8a242ea58eb624dcecf50409a199daead543f Mon Sep 17 00:00:00 2001
From: Eric Blossom <eb@comsec.com>
Date: Mon, 7 Dec 2009 18:58:07 -0800
Subject: Change type of gr_head nitems parameter to unsigned long long.

Patch from Martin Braun <martin.braun@kit.edu> to support
nitems >= 2**32.
---
 gnuradio-core/src/lib/general/gr_head.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'gnuradio-core/src/lib/general/gr_head.cc')

diff --git a/gnuradio-core/src/lib/general/gr_head.cc b/gnuradio-core/src/lib/general/gr_head.cc
index 01035ffcda..b52735c06e 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;
-- 
cgit v1.2.3