[cairo] change family parameter to const
Andrew Chant
andrew.chant at utoronto.ca
Thu Dec 11 00:39:42 PST 2003
Hi,
This patch changes family from a char * to a const char * for functions
which take a parameter for the family of a font being selected.
It allows you to simply pass constant strings to cairo_select_font. Please let me know if I missed any important functions, and feel free to ignore this patch if it is useless/will cause problems.
functions affected:
cairo_select_font
_cairo_font_create
_cairo_ft_font_create
_cairo_gstate_select_font
-Andrew Chant
andrew.chant at utoronto.ca
-------------- next part --------------
Index: src/cairo.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.c,v
retrieving revision 1.29
diff -u -3 -p -u -r1.29 cairo.c
--- src/cairo.c 17 Nov 2003 15:04:16 -0000 1.29
+++ src/cairo.c 11 Dec 2003 08:27:38 -0000
@@ -646,7 +646,7 @@ cairo_clip (cairo_t *cr)
void
cairo_select_font (cairo_t *cr,
- char *family,
+ const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight)
{
Index: src/cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.32
diff -u -3 -p -u -r1.32 cairo.h
--- src/cairo.h 5 Dec 2003 16:53:07 -0000 1.32
+++ src/cairo.h 11 Dec 2003 08:27:38 -0000
@@ -370,7 +370,7 @@ typedef enum cairo_font_slant {
extern void __external_linkage
cairo_select_font (cairo_t *ct,
- char *family,
+ const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight);
Index: src/cairo_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_font.c,v
retrieving revision 1.14
diff -u -3 -p -u -r1.14 cairo_font.c
--- src/cairo_font.c 30 Oct 2003 18:55:04 -0000 1.14
+++ src/cairo_font.c 11 Dec 2003 08:27:38 -0000
@@ -28,7 +28,7 @@
#include "cairoint.h"
cairo_font_t *
-_cairo_font_create (char *family,
+_cairo_font_create (const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight)
{
Index: src/cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.7
diff -u -3 -p -u -r1.7 cairo_ft_font.c
--- src/cairo_ft_font.c 31 Oct 2003 18:41:37 -0000 1.7
+++ src/cairo_ft_font.c 11 Dec 2003 08:27:38 -0000
@@ -123,7 +123,7 @@ cairo_ft_font_pattern (cairo_font_t *fo
/* implement the backend interface */
static cairo_font_t *
-_cairo_ft_font_create (char *family,
+_cairo_ft_font_create (const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight)
{
Index: src/cairo_gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_gstate.c,v
retrieving revision 1.33
diff -u -3 -p -u -r1.33 cairo_gstate.c
--- src/cairo_gstate.c 17 Nov 2003 15:04:16 -0000 1.33
+++ src/cairo_gstate.c 11 Dec 2003 08:27:39 -0000
@@ -1552,7 +1552,7 @@ _cairo_gstate_show_surface (cairo_gstate
cairo_status_t
_cairo_gstate_select_font (cairo_gstate_t *gstate,
- char *family,
+ const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight)
{
Index: src/cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.41
diff -u -3 -p -u -r1.41 cairoint.h
--- src/cairoint.h 8 Dec 2003 21:38:26 -0000 1.41
+++ src/cairoint.h 11 Dec 2003 08:27:39 -0000
@@ -734,7 +734,7 @@ _cairo_gstate_show_surface (cairo_gstate
extern cairo_status_t __internal_linkage
_cairo_gstate_select_font (cairo_gstate_t *gstate,
- char *family,
+ const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight);
@@ -808,7 +808,7 @@ _cairo_color_set_alpha (cairo_color_t *c
/* cairo_font.c */
extern cairo_font_t * __internal_linkage
-_cairo_font_create (char *family,
+_cairo_font_create (const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight);
More information about the cairo
mailing list