diff options
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/bbox-device.c | 2 | ||||
-rw-r--r-- | source/fitz/device.c | 4 | ||||
-rw-r--r-- | source/fitz/draw-device.c | 2 | ||||
-rw-r--r-- | source/fitz/list-device.c | 2 | ||||
-rw-r--r-- | source/fitz/stext-device.c | 2 | ||||
-rw-r--r-- | source/fitz/svg-device.c | 2 | ||||
-rw-r--r-- | source/fitz/test-device.c | 2 | ||||
-rw-r--r-- | source/fitz/trace-device.c | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/source/fitz/bbox-device.c b/source/fitz/bbox-device.c index 340eef3c..26268712 100644 --- a/source/fitz/bbox-device.c +++ b/source/fitz/bbox-device.c @@ -189,7 +189,7 @@ fz_bbox_drop_device(fz_context *ctx, fz_device *dev) fz_device * fz_new_bbox_device(fz_context *ctx, fz_rect *result) { - fz_bbox_device *dev = fz_new_device(ctx, sizeof *dev); + fz_bbox_device *dev = fz_new_derived_device(ctx, fz_bbox_device); dev->super.drop_device = fz_bbox_drop_device; diff --git a/source/fitz/device.c b/source/fitz/device.c index 727000e8..f79c8edf 100644 --- a/source/fitz/device.c +++ b/source/fitz/device.c @@ -1,7 +1,7 @@ #include "fitz-imp.h" -void * -fz_new_device(fz_context *ctx, int size) +fz_device * +fz_new_device_of_size(fz_context *ctx, int size) { fz_device *dev = Memento_label(fz_calloc(ctx, 1, size), "fz_device"); dev->refs = 1; diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 857844fe..25323b15 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -2294,7 +2294,7 @@ fz_draw_render_flags(fz_context *ctx, fz_device *devp, int set, int clear) fz_device * fz_new_draw_device(fz_context *ctx, const fz_matrix *transform, fz_pixmap *dest) { - fz_draw_device *dev = fz_new_device(ctx, sizeof *dev); + fz_draw_device *dev = fz_new_derived_device(ctx, fz_draw_device); dev->super.drop_device = fz_draw_drop_device; diff --git a/source/fitz/list-device.c b/source/fitz/list-device.c index b12612b4..1f0d19d6 100644 --- a/source/fitz/list-device.c +++ b/source/fitz/list-device.c @@ -1209,7 +1209,7 @@ fz_new_list_device(fz_context *ctx, fz_display_list *list) { fz_list_device *dev; - dev = fz_new_device(ctx, sizeof(fz_list_device)); + dev = fz_new_derived_device(ctx, fz_list_device); dev->super.fill_path = fz_list_fill_path; dev->super.stroke_path = fz_list_stroke_path; diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index 06a06e83..d0d9d401 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -1097,7 +1097,7 @@ fz_parse_stext_options(fz_context *ctx, fz_stext_options *opts, const char *stri fz_device * fz_new_stext_device(fz_context *ctx, fz_stext_sheet *sheet, fz_stext_page *page, const fz_stext_options *opts) { - fz_stext_device *dev = fz_new_device(ctx, sizeof *dev); + fz_stext_device *dev = fz_new_derived_device(ctx, fz_stext_device); dev->super.hints = FZ_IGNORE_IMAGE | FZ_IGNORE_SHADE; diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c index e80682fd..9ae4f189 100644 --- a/source/fitz/svg-device.c +++ b/source/fitz/svg-device.c @@ -1255,7 +1255,7 @@ svg_dev_drop_device(fz_context *ctx, fz_device *dev) fz_device *fz_new_svg_device(fz_context *ctx, fz_output *out, float page_width, float page_height, int text_format, int reuse_images) { - svg_device *dev = fz_new_device(ctx, sizeof *dev); + svg_device *dev = fz_new_derived_device(ctx, svg_device); dev->super.close_device = svg_dev_close_device; dev->super.drop_device = svg_dev_drop_device; diff --git a/source/fitz/test-device.c b/source/fitz/test-device.c index abe27dbb..f12a294b 100644 --- a/source/fitz/test-device.c +++ b/source/fitz/test-device.c @@ -462,7 +462,7 @@ fz_test_end_tile(fz_context *ctx, fz_device *dev_) fz_device * fz_new_test_device(fz_context *ctx, int *is_color, float threshold, int options, fz_device *passthrough) { - fz_test_device *dev = fz_new_device(ctx, sizeof *dev); + fz_test_device *dev = fz_new_derived_device(ctx, fz_test_device); dev->super.fill_path = fz_test_fill_path; dev->super.stroke_path = fz_test_stroke_path; diff --git a/source/fitz/trace-device.c b/source/fitz/trace-device.c index d306297f..c2f8b4c2 100644 --- a/source/fitz/trace-device.c +++ b/source/fitz/trace-device.c @@ -350,7 +350,7 @@ fz_trace_end_tile(fz_context *ctx, fz_device *dev) fz_device *fz_new_trace_device(fz_context *ctx, fz_output *out) { - fz_trace_device *dev = fz_new_device(ctx, sizeof *dev); + fz_trace_device *dev = fz_new_derived_device(ctx, fz_trace_device); dev->super.fill_path = fz_trace_fill_path; dev->super.stroke_path = fz_trace_stroke_path; |