diff options
Diffstat (limited to 'xps')
-rw-r--r-- | xps/muxps.h | 2 | ||||
-rw-r--r-- | xps/xps_zip.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/xps/muxps.h b/xps/muxps.h index 128ed35f..8ec577af 100644 --- a/xps/muxps.h +++ b/xps/muxps.h @@ -45,7 +45,7 @@ xps_document *xps_open_document(fz_context *ctx, char *filename); fz_open_file_w or fz_open_fd for opening a stream, and fz_close for closing an open stream. */ -xps_document *xps_open_document_with_stream(fz_stream *file); +xps_document *xps_open_document_with_stream(fz_context *ctx, fz_stream *file); /* xps_close_document: Closes and frees an opened document. diff --git a/xps/xps_zip.c b/xps/xps_zip.c index e36f9c0f..762fe2ba 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -576,9 +576,8 @@ xps_open_document_with_directory(fz_context *ctx, char *directory) } xps_document * -xps_open_document_with_stream(fz_stream *file) +xps_open_document_with_stream(fz_context *ctx, fz_stream *file) { - fz_context *ctx = file->ctx; xps_document *doc; doc = fz_malloc_struct(ctx, xps_document); @@ -624,7 +623,7 @@ xps_open_document(fz_context *ctx, char *filename) fz_try(ctx) { - doc = xps_open_document_with_stream(file); + doc = xps_open_document_with_stream(ctx, file); } fz_always(ctx) { |