aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-element.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
commit948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch)
tree4133b1adfd94d8f889ca7ad4ad851346518f4171 /filter/filter-element.c
parentcc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff)
downloadgsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'filter/filter-element.c')
-rw-r--r--filter/filter-element.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/filter/filter-element.c b/filter/filter-element.c
index 1fa0a14ee8..f2d65d63b4 100644
--- a/filter/filter-element.c
+++ b/filter/filter-element.c
@@ -31,14 +31,14 @@
#include "filter-element.h"
struct _element_type {
- char *name;
+ gchar *name;
FilterElementFunc create;
- void *data;
+ gpointer data;
};
static gboolean validate (FilterElement *fe);
-static int element_eq(FilterElement *fe, FilterElement *cm);
+static gint element_eq(FilterElement *fe, FilterElement *cm);
static void xml_create(FilterElement *fe, xmlNodePtr node);
static FilterElement *clone(FilterElement *fe);
static void copy_value(FilterElement *de, FilterElement *se);
@@ -122,7 +122,7 @@ filter_element_validate (FilterElement *fe)
return FILTER_ELEMENT_GET_CLASS (fe)->validate (fe);
}
-int
+gint
filter_element_eq (FilterElement *fe, FilterElement *cm)
{
FilterElementClass *klass;
@@ -168,7 +168,7 @@ filter_element_xml_encode (FilterElement *fe)
*
* Return value:
**/
-int
+gint
filter_element_xml_decode (FilterElement *fe, xmlNodePtr node)
{
return FILTER_ELEMENT_GET_CLASS (fe)->xml_decode (fe, node);
@@ -254,7 +254,7 @@ element_eq (FilterElement *fe, FilterElement *cm)
static void
xml_create (FilterElement *fe, xmlNodePtr node)
{
- fe->name = (char *)xmlGetProp (node, (const unsigned char *)"name");
+ fe->name = (gchar *)xmlGetProp (node, (const guchar *)"name");
}
static FilterElement *
@@ -288,7 +288,7 @@ copy_value(FilterElement *de, FilterElement *se)
if (((FilterInput *)se)->values)
filter_input_set_value((FilterInput*)de, ((FilterInput *)se)->values->data);
} else if (IS_FILTER_INT(de)) {
- ((FilterInt *)de)->val = atoi((char *) ((FilterInput *)se)->values->data);
+ ((FilterInt *)de)->val = atoi((gchar *) ((FilterInput *)se)->values->data);
}
} else if (IS_FILTER_COLOUR(se)) {
if (IS_FILTER_COLOUR(de)) {
@@ -312,7 +312,7 @@ copy_value(FilterElement *de, FilterElement *se)
} else if (IS_FILTER_INPUT(de)) {
FilterInt *s = (FilterInt *)se;
FilterInput *d = (FilterInput *)de;
- char *v;
+ gchar *v;
v = g_strdup_printf("%d", s->val);
filter_input_set_value(d, v);