diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-03-11 22:07:53 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-03-11 22:07:53 +0100 |
commit | 2e04ad6b587c9a34d18819165152ace7657cf443 (patch) | |
tree | 61fcaf8afa4509a38fd3deab41ad100ad6939cbe /fitz/stm_buffer.c | |
parent | 9f6a77c2d17128a44bf2fc9fead449a05354def5 (diff) | |
download | mupdf-2e04ad6b587c9a34d18819165152ace7657cf443.tar.xz |
Remove fz_outofmem constant.
Diffstat (limited to 'fitz/stm_buffer.c')
-rw-r--r-- | fitz/stm_buffer.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fitz/stm_buffer.c b/fitz/stm_buffer.c index 128d6e8e..102d7327 100644 --- a/fitz/stm_buffer.c +++ b/fitz/stm_buffer.c @@ -1,14 +1,14 @@ #include "fitz_base.h" #include "fitz_stream.h" -fz_error +fz_error fz_newbuffer(fz_buffer **bp, int size) { fz_buffer *b; b = *bp = fz_malloc(sizeof(fz_buffer)); if (!b) - return fz_throw("outofmem: buffer struct"); + return fz_rethrow(-1, "out of memory: buffer struct"); b->refs = 1; b->ownsdata = 1; @@ -16,7 +16,7 @@ fz_newbuffer(fz_buffer **bp, int size) if (!b->bp) { fz_free(b); - return fz_throw("outofmem: buffer memory"); + return fz_rethrow(-1, "out of memory: buffer memory"); } b->rp = b->bp; @@ -27,14 +27,14 @@ fz_newbuffer(fz_buffer **bp, int size) return fz_okay; } -fz_error +fz_error fz_newbufferwithmemory(fz_buffer **bp, unsigned char *data, int size) { fz_buffer *b; b = *bp = fz_malloc(sizeof(fz_buffer)); if (!b) - return fz_throw("outofmem: buffer struct"); + return fz_rethrow(-1, "out of memory: buffer struct"); b->refs = 1; b->ownsdata = 0; @@ -66,7 +66,7 @@ fz_dropbuffer(fz_buffer *buf) } } -fz_error +fz_error fz_growbuffer(fz_buffer *buf) { unsigned char *newbp; @@ -80,7 +80,7 @@ fz_growbuffer(fz_buffer *buf) newbp = fz_realloc(buf->bp, ep * 2); if (!newbp) - return fz_throw("outofmem: resize buffer memory"); + return fz_rethrow(-1, "out of memory: resize buffer memory"); buf->bp = newbp; buf->rp = buf->bp + rp; @@ -90,7 +90,7 @@ fz_growbuffer(fz_buffer *buf) return fz_okay; } -fz_error +fz_error fz_rewindbuffer(fz_buffer *buf) { if (!buf->ownsdata) |