summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-03-28 10:55:24 +0100
committerRobin Watts <robin.watts@artifex.com>2017-03-28 10:56:21 +0100
commita7e597397133d4aaa717869258eac6ae34c7dad0 (patch)
treece8c4a2c34f4282b69ddd24531ae1c319470e8c4 /include
parent57b2ee8fe52cf9e2eaf4095b8697f33e17a5529f (diff)
downloadmupdf-a7e597397133d4aaa717869258eac6ae34c7dad0.tar.xz
Rejig fz_new_device to be fz_new_derived_device.
In keeping with the rest of the code.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/device.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mupdf/fitz/device.h b/include/mupdf/fitz/device.h
index e40cc2a5..d65bfcb8 100644
--- a/include/mupdf/fitz/device.h
+++ b/include/mupdf/fitz/device.h
@@ -147,7 +147,10 @@ int fz_begin_tile_id(fz_context *ctx, fz_device *dev, const fz_rect *area, const
void fz_end_tile(fz_context *ctx, fz_device *dev);
void fz_render_flags(fz_context *ctx, fz_device *dev, int set, int clear);
-void *fz_new_device(fz_context *ctx, int size);
+fz_device *fz_new_device_of_size(fz_context *ctx, int size);
+
+#define fz_new_derived_device(CTX, TYPE) \
+ ((TYPE *)Memento_label(fz_new_device_of_size(ctx,sizeof(TYPE)),#TYPE))
/*
fz_close_device: Signal the end of input, and flush any buffered output.