From ad8936bf2bcf54c7042bdec20c49c96657649b34 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 12 Jan 2016 17:30:59 +0000 Subject: Add lots of consts. In general, we should use 'const fz_blah' in device calls whenever the callee should not alter the fz_blah. Push this through. This shows up various places where we fz_keep and fz_drop these const things. I've updated the fz_keep and fz_drops with appropriate casts to remove the consts. We may need to do the union dance to avoid the consts for some compilers, but will only do that if required. I think this is nicer overall, even allowing for the const<->no const problems. --- source/fitz/pixmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/fitz/pixmap.c') diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c index faabea2c..d2086d6f 100644 --- a/source/fitz/pixmap.c +++ b/source/fitz/pixmap.c @@ -981,7 +981,7 @@ png_from_pixmap(fz_context *ctx, fz_pixmap *pix, int drop) } fz_buffer * -fz_new_buffer_from_image_as_png(fz_context *ctx, fz_image *image, int w, int h) +fz_new_buffer_from_image_as_png(fz_context *ctx, const fz_image *image, int w, int h) { return png_from_pixmap(ctx, fz_get_pixmap_from_image(ctx, image, image->w, image->h), 1); } -- cgit v1.2.3