From cfd204824fada7d2b4bcf4994c4200ae9b5a8b26 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 18 Jan 2010 18:20:16 +0000 Subject: Constify stroke style and matrices. As a simple step to ensure that we do not inadvertently modify (or at least generate compiler warns if we try) user data, mark the incoming style and matrices as constant. --- src/cairo-pdf-operators.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/cairo-pdf-operators.c') diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c index e4a07236..8c3849bc 100644 --- a/src/cairo-pdf-operators.c +++ b/src/cairo-pdf-operators.c @@ -544,9 +544,9 @@ _cairo_pdf_line_join (cairo_line_join_t join) } cairo_int_status_t -_cairo_pdf_operators_emit_stroke_style (cairo_pdf_operators_t *pdf_operators, - cairo_stroke_style_t *style, - double scale) +_cairo_pdf_operators_emit_stroke_style (cairo_pdf_operators_t *pdf_operators, + const cairo_stroke_style_t *style, + double scale) { double *dash = style->dash; int num_dashes = style->num_dashes; @@ -701,12 +701,12 @@ _cairo_matrix_factor_out_scale (cairo_matrix_t *m, double *scale) } static cairo_int_status_t -_cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t *pdf_operators, - cairo_path_fixed_t *path, - cairo_stroke_style_t *style, - cairo_matrix_t *ctm, - cairo_matrix_t *ctm_inverse, - const char *pdf_operator) +_cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + const cairo_stroke_style_t *style, + const cairo_matrix_t *ctm, + const cairo_matrix_t *ctm_inverse, + const char *pdf_operator) { cairo_status_t status; cairo_matrix_t m, path_transform; @@ -792,11 +792,11 @@ _cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t *pdf_operators, } cairo_int_status_t -_cairo_pdf_operators_stroke (cairo_pdf_operators_t *pdf_operators, - cairo_path_fixed_t *path, - cairo_stroke_style_t *style, - cairo_matrix_t *ctm, - cairo_matrix_t *ctm_inverse) +_cairo_pdf_operators_stroke (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + const cairo_stroke_style_t *style, + const cairo_matrix_t *ctm, + const cairo_matrix_t *ctm_inverse) { return _cairo_pdf_operators_emit_stroke (pdf_operators, path, @@ -846,12 +846,12 @@ _cairo_pdf_operators_fill (cairo_pdf_operators_t *pdf_operators, } cairo_int_status_t -_cairo_pdf_operators_fill_stroke (cairo_pdf_operators_t *pdf_operators, +_cairo_pdf_operators_fill_stroke (cairo_pdf_operators_t *pdf_operators, cairo_path_fixed_t *path, - cairo_fill_rule_t fill_rule, - cairo_stroke_style_t *style, - cairo_matrix_t *ctm, - cairo_matrix_t *ctm_inverse) + cairo_fill_rule_t fill_rule, + const cairo_stroke_style_t *style, + const cairo_matrix_t *ctm, + const cairo_matrix_t *ctm_inverse) { const char *operator; -- cgit v1.2.3