From 9b4acc78d2a56a5f79d69f50e72197930509505e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 26 Apr 2016 20:11:49 +0200 Subject: Add fz_close_device function. Garbage collected languages need a way to signal that they are done with a device other than freeing it. Call it implicitly on fz_drop_device; so take care not to call it again in case it has been explicitly called already. --- source/pdf/pdf-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-device.c b/source/pdf/pdf-device.c index 9c38dd41..7ece963d 100644 --- a/source/pdf/pdf-device.c +++ b/source/pdf/pdf-device.c @@ -1037,7 +1037,7 @@ pdf_dev_end_tile(fz_context *ctx, fz_device *dev) } static void -pdf_dev_drop_imp(fz_context *ctx, fz_device *dev) +pdf_dev_close(fz_context *ctx, fz_device *dev) { pdf_device *pdev = (pdf_device*)dev; int i; @@ -1066,7 +1066,7 @@ fz_device *pdf_new_pdf_device(fz_context *ctx, pdf_document *doc, const fz_matri { pdf_device *dev = fz_new_device(ctx, sizeof *dev); - dev->super.drop_imp = pdf_dev_drop_imp; + dev->super.close = pdf_dev_close; dev->super.fill_path = pdf_dev_fill_path; dev->super.stroke_path = pdf_dev_stroke_path; -- cgit v1.2.3