[goffice] Compilation: constify go_data_preferred_fmt.



commit c46b06ce3d631c06c68f5cd6c8bc2043f948814f
Author: Morten Welinder <terra gnome org>
Date:   Fri Aug 5 10:22:25 2011 -0400

    Compilation: constify go_data_preferred_fmt.

 ChangeLog                         |    5 +++++
 goffice/data/go-data.c            |    2 +-
 goffice/data/go-data.h            |    2 +-
 plugins/plot_barcol/gog-1.5d.h    |    2 +-
 plugins/plot_surface/gog-xyz.c    |    2 +-
 plugins/plot_surface/gog-xyz.h    |    2 +-
 plugins/plot_surface/xl-surface.c |    2 +-
 plugins/plot_xy/gog-xy-dropbar.h  |    2 +-
 plugins/plot_xy/gog-xy.h          |    4 ++--
 9 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2d4e337..0f38522 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-05  Morten Welinder  <terra gnome org>
+
+	* goffice/data/go-data.c (go_data_preferred_fmt): Constify.  Fixes
+	#635072.  All callers adjusted.
+
 2011-08-05  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/data/go-data-impl.h: sanitize the get_murkup API.
diff --git a/goffice/data/go-data.c b/goffice/data/go-data.c
index 0885e8b..2596096 100644
--- a/goffice/data/go-data.c
+++ b/goffice/data/go-data.c
@@ -145,7 +145,7 @@ go_data_eq (GOData const *a, GOData const *b)
  *
  * Returns: the fmt preferred by the the data
  **/
-GOFormat *
+GOFormat const *
 go_data_preferred_fmt (GOData const *dat)
 {
 	GODataClass const *klass = GO_DATA_GET_CLASS (dat);
diff --git a/goffice/data/go-data.h b/goffice/data/go-data.h
index 58e82f6..4b77f2c 100644
--- a/goffice/data/go-data.h
+++ b/goffice/data/go-data.h
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
 GType 		go_data_get_type 		(void);
 GOData *	go_data_dup			(GOData const *src);
 gboolean  	go_data_eq			(GOData const *a, GOData const *b);
-GOFormat *	go_data_preferred_fmt 		(GOData const *dat);
+GOFormat const *go_data_preferred_fmt 		(GOData const *dat);
 GODateConventions const *go_data_date_conv	(GOData const *dat);
 
 char *		go_data_serialize		(GOData const *dat, gpointer user);
diff --git a/plugins/plot_barcol/gog-1.5d.h b/plugins/plot_barcol/gog-1.5d.h
index 754ed4e..eb8146e 100644
--- a/plugins/plot_barcol/gog-1.5d.h
+++ b/plugins/plot_barcol/gog-1.5d.h
@@ -46,7 +46,7 @@ typedef struct {
 	unsigned int support_series_lines : 1;
 	unsigned int support_drop_lines : 1;
 	unsigned int support_lines : 1;
-	GOFormat *fmt;
+	GOFormat const *fmt;
 	GODateConventions const *date_conv;
 } GogPlot1_5d;
 
diff --git a/plugins/plot_surface/gog-xyz.c b/plugins/plot_surface/gog-xyz.c
index 4c9ab4b..cbf6b0f 100644
--- a/plugins/plot_surface/gog-xyz.c
+++ b/plugins/plot_surface/gog-xyz.c
@@ -256,7 +256,7 @@ gog_xyz_plot_axis_get_bounds (GogPlot *plot, GogAxisType axis,
 	GogXYZPlot *xyz = GOG_XYZ_PLOT (plot);
 	GOData *vec = NULL;
 	double min, max;
-	GOFormat *fmt;
+	GOFormat const *fmt;
 	if (!plot->series)
 		return NULL;
 	series = GOG_XYZ_SERIES (plot->series->data);
diff --git a/plugins/plot_surface/gog-xyz.h b/plugins/plot_surface/gog-xyz.h
index f52a2be..99d3817 100644
--- a/plugins/plot_surface/gog-xyz.h
+++ b/plugins/plot_surface/gog-xyz.h
@@ -42,7 +42,7 @@ typedef struct {
 	gboolean auto_x, auto_y; /* automatic limits for xyz plots */
 	struct {
 		double minima, maxima;
-		GOFormat *fmt;
+		GOFormat const *fmt;
 		GODateConventions const *date_conv;
 	} x, y, z;
 	double *plotted_data;
diff --git a/plugins/plot_surface/xl-surface.c b/plugins/plot_surface/xl-surface.c
index a52f47a..43a54ab 100644
--- a/plugins/plot_surface/xl-surface.c
+++ b/plugins/plot_surface/xl-surface.c
@@ -172,7 +172,7 @@ xl_xyz_plot_axis_get_bounds (GogPlot *plot, GogAxisType axis,
 {
 	GogXYZPlot *xyz = GOG_XYZ_PLOT (plot);
 	GOData *vec = NULL;
-	GOFormat *fmt;
+	GOFormat const *fmt;
 
 	if (axis == GOG_AXIS_X) {
 		XLXYZSeries *series = XL_XYZ_SERIES (plot->series->data);
diff --git a/plugins/plot_xy/gog-xy-dropbar.h b/plugins/plot_xy/gog-xy-dropbar.h
index 07e92d3..3b32f1a 100644
--- a/plugins/plot_xy/gog-xy-dropbar.h
+++ b/plugins/plot_xy/gog-xy-dropbar.h
@@ -34,7 +34,7 @@ typedef struct {
 	double width;
 	struct axes_data {
 		double minima, maxima;
-		GOFormat *fmt;
+		GOFormat const *fmt;
 		GODateConventions const *date_conv;
 	} x, y;
 } GogXYDropBarPlot;
diff --git a/plugins/plot_xy/gog-xy.h b/plugins/plot_xy/gog-xy.h
index 65cf5c5..8879c65 100644
--- a/plugins/plot_xy/gog-xy.h
+++ b/plugins/plot_xy/gog-xy.h
@@ -32,7 +32,7 @@ typedef struct {
 
 	struct {
 		double minima, maxima;
-		GOFormat *fmt;
+		GOFormat const *fmt;
 		GODateConventions const *date_conv;
 	} x, y;
 } Gog2DPlot;
@@ -60,7 +60,7 @@ typedef struct {
 	gboolean	hide_outliers;
 	struct {
 		double minima, maxima;
-		GOFormat *fmt;
+		GOFormat const *fmt;
 		GODateConventions const *date_conv;
 	} z;
 } GogXYColorPlot;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]