X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Fmemory-stream.cc;h=511657f5fcc733d2b15d2846155f10cbdd88477f;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=c72eb53947a6b9c549368cf77d575b9bfb0d0e1e;hpb=4bb29573149a0ffa1f881c5e38a0fe68e9e76b67;p=lilypond.git diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc index c72eb53947..511657f5fc 100644 --- a/flower/memory-stream.cc +++ b/flower/memory-stream.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2005--2011 Han-Wen Nienhuys + Copyright (C) 2005--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ Memory_out_stream::functions_ Memory_out_stream::cleaner }; -int +ssize_t Memory_out_stream::cleaner (void *cookie) { Memory_out_stream *stream = (Memory_out_stream *) cookie; @@ -93,7 +93,7 @@ Memory_out_stream::writer (void *cookie, { Memory_out_stream *stream = (Memory_out_stream *) cookie; - ssize_t newsize = stream->size_ + size; + ssize_t newsize = stream->size_ + (ssize_t) size; bool change = false; while (newsize > stream->buffer_blocks_ * block_size_) @@ -105,12 +105,12 @@ Memory_out_stream::writer (void *cookie, if (change) stream->buffer_ = (char *) realloc (stream->buffer_, - stream->buffer_blocks_ * block_size_); + (size_t) (stream->buffer_blocks_ * block_size_)); memcpy (stream->buffer_ + stream->size_, buffer, size); stream->size_ = newsize; - return size; + return (ssize_t) size; } ssize_t @@ -122,10 +122,10 @@ Memory_out_stream::reader (void * /* cookie */, return 0; } -int +ssize_t Memory_out_stream::seeker (void *, off64_t *, - int) + size_t) { assert (false); return 0;