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/svg | |
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/svg')
-rw-r--r-- | source/svg/svg-doc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/svg/svg-doc.c b/source/svg/svg-doc.c index 5f7f809b..d0ff1e4a 100644 --- a/source/svg/svg-doc.c +++ b/source/svg/svg-doc.c @@ -88,8 +88,11 @@ svg_open_document_with_buffer(fz_context *ctx, fz_buffer *buf) { svg_document *doc; fz_xml *root; + size_t len; + unsigned char *data; - root = fz_parse_xml(ctx, buf->data, buf->len, 0); + len = fz_buffer_storage(ctx, buf, &data); + root = fz_parse_xml(ctx, data, len, 0); doc = fz_new_document(ctx, svg_document); doc->super.drop_document = svg_drop_document; |