]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/pipe.cpp
Use size_t for sizes in I/O classes
[libs/core.git] / source / io / pipe.cpp
index 1301b3ad0a8ce2a8554157d3d737bfa99b9bd06a..01bf20aaea32c056b33e2213dafdd1d0515c3f1e 100644 (file)
@@ -54,7 +54,7 @@ void Pipe::set_inherit(bool i)
        sys_set_inherit(write_handle, i);
 }
 
-unsigned Pipe::do_write(const char *buf, unsigned size)
+size_t Pipe::do_write(const char *buf, size_t size)
 {
        if(size==0)
                return 0;
@@ -62,12 +62,12 @@ unsigned Pipe::do_write(const char *buf, unsigned size)
        return sys_write(write_handle, buf, size);
 }
 
-unsigned Pipe::do_read(char *buf, unsigned size)
+size_t Pipe::do_read(char *buf, size_t size)
 {
        if(size==0)
                return 0;
 
-       unsigned ret = reader.read(buf, size);
+       size_t ret = reader.read(buf, size);
        if(ret==0)
                set_eof();