[goffice] Constify.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [goffice] Constify.
- Date: Tue, 19 May 2009 13:04:24 -0400 (EDT)
commit 65bc345a80028a71996509ff1a0eb7e33a2cf799
Author: Morten Welinder <terra gnome org>
Date: Tue May 19 13:00:58 2009 -0400
Constify.
---
ChangeLog | 8 ++++++++
goffice/gtk/go-format-sel.c | 8 ++++----
goffice/gtk/go-format-sel.h | 4 ++--
goffice/utils/go-format.c | 8 ++++++--
goffice/utils/go-format.h | 4 ++--
5 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 63fded1..4c52054 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-19 Morten Welinder <terra gnome org>
+
+ * goffice/utils/go-format.c (go_format_ref, go_format_unref):
+ Constify.
+
+ * goffice/gtk/go-format-sel.c (go_format_sel_get_fmt,
+ go_format_sel_set_style_format): Constify.
+
2009-05-18 Morten Welinder <terra gnome org>
* goffice/data/go-data-impl.h (GODataClass): New member date_conv.
diff --git a/goffice/gtk/go-format-sel.c b/goffice/gtk/go-format-sel.c
index e293c11..6e6ce4d 100644
--- a/goffice/gtk/go-format-sel.c
+++ b/goffice/gtk/go-format-sel.c
@@ -140,7 +140,7 @@ struct _GOFormatSel {
} formats;
gulong entry_changed_id;
- GOFormat *spec;
+ GOFormat const *spec;
gint current_type;
int num_decimals;
int negative_format;
@@ -371,7 +371,7 @@ static void
draw_format_preview (GOFormatSel *gfs, gboolean regen_format)
{
char *preview;
- GOFormat *sf = NULL;
+ GOFormat const *sf = NULL;
GOColor c = 0;
GdkColor gdk_color;
gsize len;
@@ -1541,7 +1541,7 @@ go_format_sel_set_focus (GOFormatSel *gfs)
void
go_format_sel_set_style_format (GOFormatSel *gfs,
- GOFormat *style_format)
+ GOFormat const *style_format)
{
GOComboText *combo;
@@ -1579,7 +1579,7 @@ go_format_sel_set_dateconv (GOFormatSel *gfs,
draw_format_preview (gfs, TRUE);
}
-GOFormat *
+GOFormat const *
go_format_sel_get_fmt (GOFormatSel *gfs)
{
g_return_val_if_fail (GO_IS_FORMAT_SEL (gfs), NULL);
diff --git a/goffice/gtk/go-format-sel.h b/goffice/gtk/go-format-sel.h
index 55ba0e3..908bcec 100644
--- a/goffice/gtk/go-format-sel.h
+++ b/goffice/gtk/go-format-sel.h
@@ -36,11 +36,11 @@ GtkWidget * go_format_sel_new_full (gboolean use_markup);
void go_format_sel_set_focus (GOFormatSel *gfs);
void go_format_sel_set_style_format (GOFormatSel *gfs,
- GOFormat *style_format);
+ GOFormat const *style_format);
void go_format_sel_set_locale (GOFormatSel *gfs,
char const *locale);
-GOFormat *go_format_sel_get_fmt (GOFormatSel *gfs);
+GOFormat const *go_format_sel_get_fmt (GOFormatSel *gfs);
GODateConventions const *
go_format_sel_get_dateconv (GOFormatSel *gfs);
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index c918e73..506fe43 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -4378,8 +4378,10 @@ go_format_eq (GOFormat const *a, GOFormat const *b)
* Returns: @gf
**/
GOFormat *
-go_format_ref (GOFormat *gf)
+go_format_ref (GOFormat const *gf_)
{
+ GOFormat *gf = (GOFormat *)gf_;
+
g_return_val_if_fail (gf != NULL, NULL);
gf->ref_count++;
@@ -4403,8 +4405,10 @@ go_format_ref (GOFormat *gf)
*
**/
void
-go_format_unref (GOFormat *gf)
+go_format_unref (GOFormat const *gf_)
{
+ GOFormat *gf = (GOFormat *)gf_;
+
if (gf == NULL)
return;
diff --git a/goffice/utils/go-format.h b/goffice/utils/go-format.h
index a756be3..9e3bfc3 100644
--- a/goffice/utils/go-format.h
+++ b/goffice/utils/go-format.h
@@ -109,8 +109,8 @@ char *go_format_str_localize (char const *str);
char *go_format_str_delocalize (char const *str);
const char* go_format_as_XL (GOFormat const *fmt);
-GOFormat *go_format_ref (GOFormat *fmt);
-void go_format_unref (GOFormat *fmt);
+GOFormat *go_format_ref (GOFormat const *fmt);
+void go_format_unref (GOFormat const *fmt);
gboolean go_format_is_invalid (GOFormat const *fmt);
gboolean go_format_is_general (GOFormat const *fmt);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]