diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-11-11 16:05:30 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-11-14 16:09:39 +0000 |
commit | 37f95f87bdfb2e0b01d649afae5fffe60bf99d3a (patch) | |
tree | da3491c62d6af86c1a5bc4e523e8f9ebe19793d1 /source/pdf/pdf-xref.c | |
parent | c0e1dfdab1a13def046e94d771f8a821ba2a10d9 (diff) | |
download | mupdf-37f95f87bdfb2e0b01d649afae5fffe60bf99d3a.tar.xz |
Make fz_buffer structure private to fitz.
Move the definition of the structure contents into new fitz-imp.h
file. Make all code outside of fitz access the buffer through the
defined API.
Add a convenience API for people that want to get buffers as
null terminated C strings.
Diffstat (limited to 'source/pdf/pdf-xref.c')
-rw-r--r-- | source/pdf/pdf-xref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index 6280c2ff..df3c3254 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -2119,7 +2119,7 @@ pdf_update_stream(fz_context *ctx, pdf_document *doc, pdf_obj *obj, fz_buffer *n fz_drop_buffer(ctx, x->stm_buf); x->stm_buf = fz_keep_buffer(ctx, newbuf); - pdf_dict_puts_drop(ctx, obj, "Length", pdf_new_int(ctx, doc, (int)newbuf->len)); + pdf_dict_puts_drop(ctx, obj, "Length", pdf_new_int(ctx, doc, (int)fz_buffer_storage(ctx, newbuf, NULL))); if (!compressed) { pdf_dict_dels(ctx, obj, "Filter"); |