diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-01-18 18:20:16 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-01-22 23:01:49 +0000 |
commit | cfd204824fada7d2b4bcf4994c4200ae9b5a8b26 (patch) | |
tree | c4497f1fca6f7230666635b1779c75c4b14cd91f /src/cairo-pdf-operators.c | |
parent | 3e17c559b04e2df208f28125746d7e0acfb4b476 (diff) |
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.
Diffstat (limited to 'src/cairo-pdf-operators.c')
-rw-r--r-- | src/cairo-pdf-operators.c | 38 |
1 files changed, 19 insertions, 19 deletions
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; |